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=-5.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 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 2BDC2C4363A for ; Mon, 5 Oct 2020 13:59:01 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C5D62207F7 for ; Mon, 5 Oct 2020 13:59:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="jq/1EENg" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C5D62207F7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 4F3C06B0062; Mon, 5 Oct 2020 09:59:00 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4ACE96B006E; Mon, 5 Oct 2020 09:59:00 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 36B1A6B0070; Mon, 5 Oct 2020 09:59:00 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 06C666B0062 for ; Mon, 5 Oct 2020 09:58:59 -0400 (EDT) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 79403362C for ; Mon, 5 Oct 2020 13:58:59 +0000 (UTC) X-FDA: 77338027998.22.tub02_0912ac1271be Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin22.hostedemail.com (Postfix) with ESMTP id 4ECF218038E67 for ; Mon, 5 Oct 2020 13:58:59 +0000 (UTC) X-HE-Tag: tub02_0912ac1271be X-Filterd-Recvd-Size: 5682 Received: from mail-lf1-f67.google.com (mail-lf1-f67.google.com [209.85.167.67]) by imf36.hostedemail.com (Postfix) with ESMTP for ; Mon, 5 Oct 2020 13:58:58 +0000 (UTC) Received: by mail-lf1-f67.google.com with SMTP id 77so11026914lfj.0 for ; Mon, 05 Oct 2020 06:58:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=FSG++GcuwtXfFL0pAmi9VIOsmecZ/zHiEFdMrjrBjZ0=; b=jq/1EENgpJztVgUbiHOlFewQRt85vb2x9X/5tTn6DHbAXnHybLY6oqIexnupDz1gaJ g01snaS7Uhn1mfY8YL/GyEKAzRhvch6cPp40maquni4o2dzDk3P/hujBXIaRX6JJHrPN 8ZDsJ3+FMC5pzRwMwEEG01DpEMz/WZAUzIDhKncN6ABVuHaBLZRhm2HtXiJ2DjqmIa7H TSXu7U6+QCA4ODIwvsYJ5rLRxpDOlVzQWxLhGVBO0jUOY3sz4l1YYq9CrfvmzDz9Dcie MH06I13mMMKVJfgK7/mUvGtAIIiPKIMSygNxwwmoj42ss8rElH/8kNE4/GvPVDglSPZ0 S6uA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=FSG++GcuwtXfFL0pAmi9VIOsmecZ/zHiEFdMrjrBjZ0=; b=gboXqFhdclkgla8H96Vh/Rnc2lKip6v8m/Aoa5EoqWMh7n74l5N5ipnqkDoZqMxyCC xhcyCdE49t0QVQqBW8XD4ok9KZQUKDW55QiyuCGyukX5nJ96UbUBX7lDjxR5cwp+G2rn VzFbPBIHigG4nucjLqRFftuK1Cb5FAABWEJgZkMDFFQnpkRQOY+tM0H+8Jk4A6OoQhEu AfKdrpEhiD5KpmWTj/w+DMfCuKb5hkLBDjQXAmOMv8UAnsCqcBUK+ManU4K+OncwQmH3 5aEvbeeqOKHR0JGSeX/iiuKFxFbfs+YKIMFgzhfhHfn2GCOze7S86WPcu669oix51vSb MULQ== X-Gm-Message-State: AOAM532k1hY6DIYo2fg6hb7/YVOO1oWbjnuM8JWBDK5Z1GM3R1vHGwbz JNWQg+Tpq8htq0HCiFVfg5I= X-Google-Smtp-Source: ABdhPJzX0Fq/hCeOCOFzQbhoFtQMbR7mUVdrmKjW8qHxJYKGuZza5OAMcXuLhDWlTnVDkaa6CE/WWA== X-Received: by 2002:a19:2302:: with SMTP id j2mr3422194lfj.78.1601906337230; Mon, 05 Oct 2020 06:58:57 -0700 (PDT) Received: from pc636 (h5ef52e31.seluork.dyn.perspektivbredband.net. [94.245.46.49]) by smtp.gmail.com with ESMTPSA id n2sm2653504lji.97.2020.10.05.06.58.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Oct 2020 06:58:56 -0700 (PDT) From: Uladzislau Rezki X-Google-Original-From: Uladzislau Rezki Date: Mon, 5 Oct 2020 15:58:54 +0200 To: Michal Hocko Cc: Uladzislau Rezki , Vlastimil Babka , LKML , RCU , linux-mm@kvack.org, Andrew Morton , "Paul E . McKenney" , Peter Zijlstra , Thomas Gleixner , "Theodore Y . Ts'o" , Joel Fernandes , Sebastian Andrzej Siewior , Oleksiy Avramchenko , Mel Gorman Subject: Re: [RFC-PATCH 2/4] mm: Add __rcu_alloc_page_lockless() func. Message-ID: <20201005135854.GA17959@pc636> References: <20200918194817.48921-1-urezki@gmail.com> <20200918194817.48921-3-urezki@gmail.com> <38f42ca1-ffcd-04a6-bf11-618deffa897a@suse.cz> <20200929220742.GB8768@pc636> <795d6aea-1846-6e08-ac1b-dbff82dd7133@suse.cz> <20201001192626.GA29606@pc636> <20201002071123.GB20872@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201002071123.GB20872@dhcp22.suse.cz> User-Agent: Mutt/1.10.1 (2018-07-13) 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, Oct 02, 2020 at 09:11:23AM +0200, Michal Hocko wrote: > On Thu 01-10-20 21:26:26, Uladzislau Rezki wrote: > > > > > > No, I meant going back to idea of new gfp flag, but adjust the implementation in > > > the allocator (different from what you posted in previous version) so that it > > > only looks at the flag after it tries to allocate from pcplist and finds out > > > it's empty. So, no inventing of new page allocator entry points or checks such > > > as the one you wrote above, but adding the new gfp flag in a way that it doesn't > > > affect existing fast paths. > > > > > OK. Now i see. Please have a look below at the patch, so we fully understand > > each other. If that is something that is close to your view or not: > > > > > > t a/include/linux/gfp.h b/include/linux/gfp.h > > index c603237e006c..7e613560a502 100644 > > --- a/include/linux/gfp.h > > +++ b/include/linux/gfp.h > > @@ -39,8 +39,9 @@ struct vm_area_struct; > > #define ___GFP_HARDWALL 0x100000u > > #define ___GFP_THISNODE 0x200000u > > #define ___GFP_ACCOUNT 0x400000u > > +#define ___GFP_NO_LOCKS 0x800000u > > Even if a new gfp flag gains a sufficient traction and support I am > _strongly_ opposed against consuming another flag for that. Bit space is > limited. > That is a valid point. > > Besides that we certainly do not want to allow craziness like > __GFP_NO_LOCK | __GFP_RECLAIM (and similar), do we? > Obviously not. And it seems that the way of implementing of the NO_LOCK logic would be easier(less code changes) and better if it was defined like below(what you proposed later in this thread): -#define __GFP_NO_LOCKS ((__force gfp_t)___GFP_NO_LOCKS) +#define __GFP_NO_LOCKS ((__force gfp_t) 0) That could imply that calling the page allocator with zero argument would apply a further limitation - that is lock free. -- Vlad Rezki