From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx170.postini.com [74.125.245.170]) by kanga.kvack.org (Postfix) with SMTP id 4F9846B0044 for ; Tue, 1 May 2012 03:20:53 -0400 (EDT) Received: by obbwd18 with SMTP id wd18so3005948obb.14 for ; Tue, 01 May 2012 00:20:52 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20120424143015.99fd8d4a.akpm@linux-foundation.org> References: <1335171318-4838-1-git-send-email-minchan@kernel.org> <4F963742.2030607@jp.fujitsu.com> <4F963B8E.9030105@kernel.org> <4F965413.9010305@kernel.org> <20120424143015.99fd8d4a.akpm@linux-foundation.org> Date: Tue, 1 May 2012 17:20:52 +1000 Message-ID: Subject: Re: [RFC] propagate gfp_t to page table alloc functions From: Nick Piggin Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Sender: owner-linux-mm@kvack.org List-ID: To: Andrew Morton Cc: Minchan Kim , KAMEZAWA Hiroyuki , Ingo Molnar , x86@kernel.org, Hugh Dickins , Johannes Weiner , Rik van Riel , Mel Gorman , kosaki.motohiro@jp.fujitsu.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org On 25 April 2012 07:30, Andrew Morton wrote: > On Tue, 24 Apr 2012 17:48:29 +1000 > Nick Piggin wrote: > >> > Hmm, there are several places to use GFP_NOIO and GFP_NOFS even, GFP_A= TOMIC. >> > I believe it's not trivial now. >> >> They're all buggy then. Unfortunately not through any real fault of thei= r own. > > There are gruesome problems in block/blk-throttle.c (thread "mempool, > percpu, blkcg: fix percpu stat allocation and remove stats_lock"). =A0It > wants to do an alloc_percpu()->vmalloc() from the IO submission path, > under GFP_NOIO. Yeah, that sucks. CFQ has something similar. Should just allocate it up front when creating a throttled group. Allocate and init when it first gets used schemes are usually pretty problematic. Is it *really* warranted to do it lazily like this? > Changing vmalloc() to take a gfp_t does make lots of sense, although I > worry a bit about making vmalloc() easier to use! > > I do wonder whether the whole scheme of explicitly passing a gfp_t was > a mistake and that the allocation context should be part of the task > context. =A0ie: pass the allocation mode via *current. =A0As a handy > side-effect that would probably save quite some code where functions > are receiving a gfp_t arg then simply passing it on to the next > callee. Both paragraphs make a lot of sense. Conceptually. :) -- 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