Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3323616pxk; Mon, 5 Oct 2020 07:02:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyzO16VmPedJ6cRt135pXtzErUqktm5kVMQKZ8hzoTpqDauA7ArfEwIR5SGB7pdnf07TulA X-Received: by 2002:ac2:5e72:: with SMTP id a18mr3827429lfr.69.1601906453609; Mon, 05 Oct 2020 07:00:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601906453; cv=none; d=google.com; s=arc-20160816; b=nNGeZ4/n5+e2vol7aLJ3IFgDM1kp7qSt5pcU1WJ/E3r2ikvDtsslLjc/us3NPUVatj 6f9pdOpWD1zBTxqrM2Aiwv/ho0GOt/4/uT8V9d1MZGAgRbCl86/mr4SWKVNwBAIIJstB uBa2b1aduHFDDr5c8TuvNr0Vca29riJUHcw9lIMxpetM5epP7XNr74iIBxohuhXZ1pg3 ZB1rEhgKmVALN4E87bWhZd54sok0fYduV1kWFmDKCCeuLoMUpnauwhdF7jP+uJt9vAOC a4+K1VSnoNOvmilj8hbILBhp/oWZ4bZHJZHvwdtkVRtPdOnAyUVegARTDa+O/w3YS52O xvbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:date:from :dkim-signature; bh=FSG++GcuwtXfFL0pAmi9VIOsmecZ/zHiEFdMrjrBjZ0=; b=WRme5SKq9Fpv0fIc6ih13/Ry5nsucG75yodnqxWV0quCvq53XdKmlTybJyDRgyyMHI gbWZ+2o1kjMbawbwCmldQnoqH7mx4i6ZBxNftinb0+Bm9cAap7zK0XhPret0cgCf3tcN J/whzYaro5pFUweKc8zZHvtsK4rP6X2ASEcr2Bij++EBehOxDiIMzm+JwWKeY3n9o3+H 6zvEXmVtwJHeBoSQoEWmyyr8BOiLVlTAo2VsaH3yeQgZL2e6ZO9w0GuJaXitVla0fWwo Fg9+tSXocfawGFGj1WTnPe6VDhUYvWaIaHs5vsk5XIq9U2akXK7GWUtwnznD3XPaW7b2 0Jhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="jq/1EENg"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z15si8413467ejr.202.2020.10.05.07.00.29; Mon, 05 Oct 2020 07:00:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="jq/1EENg"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726103AbgJEN7B (ORCPT + 99 others); Mon, 5 Oct 2020 09:59:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34676 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725963AbgJEN7A (ORCPT ); Mon, 5 Oct 2020 09:59:00 -0400 Received: from mail-lf1-x144.google.com (mail-lf1-x144.google.com [IPv6:2a00:1450:4864:20::144]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D6F80C0613CE; Mon, 5 Oct 2020 06:58:58 -0700 (PDT) Received: by mail-lf1-x144.google.com with SMTP id u8so11005792lff.1; 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=R61wspwn6vdLk3aQKtfm3Am/l7xEartIbzZShNVB/1P7KdTPf+6P1m0Q9OWBk4VCtj usM83le4MNTOFVKIQgVnRrbNW4z/XvR3CwPbmuZNjXqDgf8WbngoiJS8H+2f/v3ALiWY I34E5rxNGI8kTwb3Wg++AgSYmF20v7qHty04OjOh39r3CScvgM6XNspXvBMD4TLgQSlQ DQR7VZ/tacwZTN+yQYKiAoTRTKOxEYUH8gILFCCByOtSmcl6ddFu9G7e3LllJ/YsX7W+ VXEh80DSRbpCOrKFgpRpz9NwI1SG79QfOKmQG3y5eTl62JWQMHxhYFOmoMK9ltYss/wI 7H9A== X-Gm-Message-State: AOAM5338zF/2zTpKMW0XJgftwIMM6bRyNSjefY5bmYcJp+ryN+GlxM2/ ymIUCX5l6J9lSWs4Q8X2DRo= 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) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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