From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EA0BFC433E3 for ; Fri, 14 Aug 2020 23:40:35 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id AF0A7206B2 for ; Fri, 14 Aug 2020 23:40:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="wQEpHbzY"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="YY9WNXQ1" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AF0A7206B2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linutronix.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 3B44F6B0006; Fri, 14 Aug 2020 19:40:35 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 33C946B0007; Fri, 14 Aug 2020 19:40:35 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 206286B0008; Fri, 14 Aug 2020 19:40:35 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0095.hostedemail.com [216.40.44.95]) by kanga.kvack.org (Postfix) with ESMTP id 0657F6B0006 for ; Fri, 14 Aug 2020 19:40:35 -0400 (EDT) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id BA411181AEF2A for ; Fri, 14 Aug 2020 23:40:34 +0000 (UTC) X-FDA: 77150795988.20.paste99_5a0fa0927000 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin20.hostedemail.com (Postfix) with ESMTP id 8F27B180C07A3 for ; Fri, 14 Aug 2020 23:40:34 +0000 (UTC) X-HE-Tag: paste99_5a0fa0927000 X-Filterd-Recvd-Size: 4086 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by imf37.hostedemail.com (Postfix) with ESMTP for ; Fri, 14 Aug 2020 23:40:33 +0000 (UTC) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1597448432; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ur7uXpcRbGymuHNjafxl0I8hYKYlxBpQY8FlNgJDhJk=; b=wQEpHbzY2xfKCvU09A8XAPHp9dEn4XZ5bueEHTSjPQWBj/BQWQnwF6vxjh+yBj6z0GDYIo B3P4xDxaH17JdvAyMMTCCvBMiypPGJPYOSi14lvpV5VBNgySl+19ON/FGT4eiatymgU8PK c39pMe3oP8BiQVw/gVHMo54h8bIKJnbGKl8UFLUFUpok5QKvHLajxkW5OzsJIlynR29KuU mV8ezdiZLCjoY4OYC5v7mu5Brm911kU+oXwK+Tupr6pdUQsK6rANcizbXr4EbuGekskhZ5 L6oiZ/7+usJzQIHuyBQ0Ru1EdLySJUFxnx5ZaYVtQVdUa8Sj7Vj9JMS+1I6K5w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1597448432; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ur7uXpcRbGymuHNjafxl0I8hYKYlxBpQY8FlNgJDhJk=; b=YY9WNXQ1vA6t2lXkSOA6fbk+zoHlmPBW9/5IdhvbiirJsFuu1TJkay7LJU/LuiHny5ED5F sDDCiIpi+2ijmvCg== To: Peter Zijlstra , "Paul E. McKenney" Cc: Michal Hocko , Uladzislau Rezki , LKML , RCU , linux-mm@kvack.org, Andrew Morton , Vlastimil Babka , Matthew Wilcox , "Theodore Y . Ts'o" , Joel Fernandes , Sebastian Andrzej Siewior , Oleksiy Avramchenko Subject: Re: [RFC-PATCH 1/2] mm: Add __GFP_NO_LOCKS flag In-Reply-To: <20200814215206.GL3982@worktop.programming.kicks-ass.net> References: <20200813185257.GF4295@paulmck-ThinkPad-P72> <20200813220619.GA2674@hirez.programming.kicks-ass.net> <875z9m3xo7.fsf@nanos.tec.linutronix.de> <20200814083037.GD3982@worktop.programming.kicks-ass.net> <20200814141425.GM4295@paulmck-ThinkPad-P72> <20200814161106.GA13853@paulmck-ThinkPad-P72> <20200814174924.GI3982@worktop.programming.kicks-ass.net> <20200814180224.GQ4295@paulmck-ThinkPad-P72> <875z9lkoo4.fsf@nanos.tec.linutronix.de> <20200814204140.GT4295@paulmck-ThinkPad-P72> <20200814215206.GL3982@worktop.programming.kicks-ass.net> Date: Sat, 15 Aug 2020 01:40:31 +0200 Message-ID: <87imdkkd8w.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain X-Rspamd-Queue-Id: 8F27B180C07A3 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam02 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri, Aug 14 2020 at 23:52, Peter Zijlstra wrote: > On Fri, Aug 14, 2020 at 01:41:40PM -0700, Paul E. McKenney wrote: >> > And that enforces the GFP_NOLOCK allocation mode or some other solution >> > unless you make a new rule that calling call_rcu() is forbidden while >> > holding zone lock or any other lock which might be nested inside the >> > GFP_NOWAIT zone::lock held region. >> >> Again, you are correct. Maybe the forecasted weekend heat will cause >> my brain to hallucinate a better solution, but in the meantime, the >> GFP_NOLOCK approach looks good from this end. > > So I hate __GFP_NO_LOCKS for a whole number of reasons: > > - it should be called __GFP_LOCKLESS if anything > - it sprinkles a bunch of ugly branches around the allocator fast path > - it only works for order==0 > > Combined I really odn't think this should be a GFP flag. How about a > special purpose allocation function, something like so.. No. No. No. It's not requried at all after the context got set straight and my brain started working again. There is no need to provide such a thing which tries to "optimize" unfixable problems and as a consequence makes other people use it for the completely wrong reasons all over the place. We have plenty of that stuff already. No need for more ... Thanks, tglx