Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757291AbYFWKiS (ORCPT ); Mon, 23 Jun 2008 06:38:18 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754960AbYFWKiG (ORCPT ); Mon, 23 Jun 2008 06:38:06 -0400 Received: from rv-out-0506.google.com ([209.85.198.236]:36422 "EHLO rv-out-0506.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754680AbYFWKiE (ORCPT ); Mon, 23 Jun 2008 06:38:04 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=W1/E9eckYBIN1o/VfxtogZ+lqM2rLGkP2K/mXqZQ5ycltOhAD1MkJ4+A7owwNurH1K yEABkvt0rOlcWGB2arcUKynmP1+wvTdMXEcGiKCTPs0vi8WVNRYnOlGGqT7Wc73gvQV4 e3dw4mbAoH2FVhITpQddeKh2mv0TKu9Uvm+Ak= Message-ID: <485F7D04.7000609@gmail.com> Date: Mon, 23 Jun 2008 12:37:56 +0200 From: Andrea Righi Reply-To: righi.andrea@gmail.com User-Agent: Swiftdove 2.0.0.14 (X11/20080505) MIME-Version: 1.0 To: Eric Rannaud CC: Divyesh Shah , balbir@linux.vnet.ibm.com, menage@google.com, linux-kernel@vger.kernel.org, axboe@kernel.dk, matt@bluehost.com, roberto@unbit.it, randy.dunlap@oracle.com, akpm@linux-foundation.org Subject: Re: i/o bandwidth controller infrastructure References: <20030410181011$6d15@gated-at.bofh.it> <75b07c02-1595-4af2-ac87-3b067459f62e@w8g2000prd.googlegroups.com> <48D0786A-AC3B-46C3-B35C-EAAA47BFAEBC@google.com> <4856EB9D.6070804@gmail.com> In-Reply-To: Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1867 Lines: 38 Eric Rannaud wrote: > On Tue, 17 Jun 2008, Andrea Righi wrote: >>> With this bandwidth controller, a cpu-intensive job which otherwise does >>> not care about its IO >>> performance needs to be pin-point accurate about IO bandwidth required in >>> order to not suffer >>> from cpu-throttling. IMHO, if a cgroup is exceeding its limit for a given >>> resource, the throttling >>> should be done _only_ for that resource. >> I understand your point of view. It would be nice if we could just >> "disable" the i/o for a cgroup that exceeds its limit, instead of >> scheduling some sleep()s, so the tasks running in this cgroup would be >> able to continue their non-i/o operations as usual. >> >> However, how to do if the tasks continue to perform i/o ops under this >> condition? we could just cache the i/o in memory and at the same time >> reduce the i/o priority of those tasks' requests, but this would require >> a lot of memory, more space in the page cache, and probably could lead >> to potential OOM conditions. A safer approach IMHO is to force the tasks >> to wait synchronously on each operation that directly or indirectly >> generates i/o. The last one is the solution implemented by this >> bandwidth controller. > > What about AIO? Is this approach going to make the task sleep as well? > Would it better to return from aio_write()/_read() with EAGAIN? Good point. I should check, but it seems sleeps are incorrectly performed also for AIO requests. I agree the correct behaviour would be to return EAGAIN instead, as you suggested. I'll look at it if nobody comes up with a solution. Thanks, -Andrea -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/