Received: from eggs.gnu.org ([2001:4830:134:3::10]:57368) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X0jhH-0000tV-H9 for qemu-devel@nongnu.org; Fri, 27 Jun 2014 23:53:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X0jhA-00009C-2Y for qemu-devel@nongnu.org; Fri, 27 Jun 2014 23:53:03 -0400 Received: from theiggy.com ([66.220.1.110]:41449 helo=mail.theiggy.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X0jh9-000096-SY for qemu-devel@nongnu.org; Fri, 27 Jun 2014 23:52:55 -0400 Message-ID: <53AE3BDE.7020500@theiggy.com> Date: Fri, 27 Jun 2014 22:51:58 -0500 From: Brian Jackson MIME-Version: 1.0 References: <76bf12.17631.146e06cc906.Coremail.kvmluck@163.com> In-Reply-To: <76bf12.17631.146e06cc906.Coremail.kvmluck@163.com> Content-Type: text/plain; charset=gbk; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] how qemu do io throttling? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: yue , qemu-devel On 6/27/2014 10:02 PM, yue wrote: > hi ,all > i now know there are 2 ways to implement io throttling, > one is cgroup, but it is only targeted at block device. > another is qemu itself. cgroups are done at the host (Linux only) kernel level. So anything that doesn't go through the host block layer (filesystems, block devices, etc.) doesn't get accounted for. > i want to know the theory how qemu itself do io throttling? and in > that case if it depends on the type of back storage(nfs,file,rbd, other posix fs)? > it better tell me where is the code . I don't know where exactly the code is, but it's in Qemu's own block layer. Which means it works with any block backend that Qemu supports. Both kernel space and user space. File backed, block backed, network backed, etc. That is one of the main reasons it was written in the first place. > > thanks >