From: Stefan Hajnoczi Subject: Re: FW: cgroup blkio.weight working, but not for KVM guests Date: Tue, 23 Oct 2012 14:35:02 +0200 Message-ID: <20121023123502.GF19977@stefanha-thinkpad.redhat.com> References: <022401cdac8d$32565fa0$97031ee0$@ncsu.edu> <014201cdb05a$414e7b20$c3eb7160$@ncsu.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: kvm@vger.kernel.org To: Ben Clay Return-path: Received: from mail-bk0-f46.google.com ([209.85.214.46]:45646 "EHLO mail-bk0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756770Ab2JWMfF (ORCPT ); Tue, 23 Oct 2012 08:35:05 -0400 Received: by mail-bk0-f46.google.com with SMTP id jk13so1533305bkc.19 for ; Tue, 23 Oct 2012 05:35:04 -0700 (PDT) Content-Disposition: inline In-Reply-To: <014201cdb05a$414e7b20$c3eb7160$@ncsu.edu> Sender: kvm-owner@vger.kernel.org List-ID: On Mon, Oct 22, 2012 at 07:36:34AM -0600, Ben Clay wrote: > Forwarding this to the KVM general list.=A0 I doubt you folks can hel= p me with > libvirt, but I was wondering if there=92s some way to verify if the c= ache=3Dnone > parameter is being respected for my KVM guest=92s disk image, or if t= here are > any other configuration/debug steps appropriate for KVM + virtio + cg= roup. Here's how you can double-check the O_DIRECT flag: =46ind the QEMU process PID on the host: ps aux | grep qemu Then find the file descriptor of the image file which the QEMU process has open: ls -l /proc/$PID/fd =46inally look at the file descriptor flags to confirm it is O_DIRECT: grep ^flags: /proc/$PID/fdinfo/$FD Note the flags field is in octal and you're looking for: #define O_DIRECT 00040000 /* direct disk access hint */ Stefan