From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Zijlstra Subject: Re: [PATCH 4/5] writeback: per task dirty rate limit Date: Mon, 08 Aug 2011 16:26:52 +0200 Message-ID: <1312813612.10488.36.camel@twins> References: <20110806084447.388624428@intel.com> <20110806094527.002914580@intel.com> <1312811234.10488.34.camel@twins> <20110808142318.GC22080@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Cc: "linux-fsdevel@vger.kernel.org" , Andrew Morton , Jan Kara , Christoph Hellwig , Dave Chinner , Greg Thelen , Minchan Kim , Vivek Goyal , Andrea Righi , linux-mm , LKML To: Wu Fengguang Return-path: In-Reply-To: <20110808142318.GC22080@localhost> Sender: owner-linux-mm@kvack.org List-Id: linux-fsdevel.vger.kernel.org On Mon, 2011-08-08 at 22:23 +0800, Wu Fengguang wrote: > + preempt_disable(); > + p =3D &__get_cpu_var(dirty_leaks); p =3D &get_cpu_var(dirty_leaks); > + if (*p > 0 && current->nr_dirtied < ratelimit) { > + nr_pages_dirtied =3D min(*p, ratelimit - current->nr_dirt= ied); > + *p -=3D nr_pages_dirtied; > + current->nr_dirtied +=3D nr_pages_dirtied; > + } > + preempt_enable();=20 put_cpu_var(dirty_leads); -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: email@kvack.org