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,URIBL_BLOCKED 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 F2C21C4727C for ; Wed, 30 Sep 2020 17:48:55 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 3566920791 for ; Wed, 30 Sep 2020 17:48:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=joelfernandes.org header.i=@joelfernandes.org header.b="K+46e+Uo" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3566920791 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=joelfernandes.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 419608E0003; Wed, 30 Sep 2020 13:48:54 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3A28F8E0001; Wed, 30 Sep 2020 13:48:54 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2919C8E0003; Wed, 30 Sep 2020 13:48:54 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0239.hostedemail.com [216.40.44.239]) by kanga.kvack.org (Postfix) with ESMTP id 104748E0001 for ; Wed, 30 Sep 2020 13:48:54 -0400 (EDT) Received: from smtpin11.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id BB280181AE867 for ; Wed, 30 Sep 2020 17:48:53 +0000 (UTC) X-FDA: 77320463346.11.wing36_63094c527194 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin11.hostedemail.com (Postfix) with ESMTP id 8BE33181251B8 for ; Wed, 30 Sep 2020 17:48:53 +0000 (UTC) X-HE-Tag: wing36_63094c527194 X-Filterd-Recvd-Size: 5048 Received: from mail-io1-f67.google.com (mail-io1-f67.google.com [209.85.166.67]) by imf07.hostedemail.com (Postfix) with ESMTP for ; Wed, 30 Sep 2020 17:48:52 +0000 (UTC) Received: by mail-io1-f67.google.com with SMTP id g7so2786859iov.13 for ; Wed, 30 Sep 2020 10:48:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=3QPmNeUX1bWiynEkFpQ8LFbxgXrdGF1ePUmA+g1hmvc=; b=K+46e+Uog+2T1I+TOuHcyrukfXR8Dcsi2XAT/Jv3NckuYxiup+3IpVVhjucX0+FBu1 xJ/juyanFTPgTdLxYe1kUJZoRIqmoDVkhGbjtk4zYqN44Ktbab3olfVq/M/9fxiOZLUN e1x/bw+NZ6QvGb3sNnwb0entFB/LOCfhKhK2w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=3QPmNeUX1bWiynEkFpQ8LFbxgXrdGF1ePUmA+g1hmvc=; b=URfQOOGCYl2SPPWmR7lCr0pVC1W/WRkEoELZjM00djxHy7w5HpbF6JJYBnvdI5AZ8U mbFqyLRkjNKctnGRgPhKWTDMB3zI2rjrZIQKzvqzDVC6pfCd3W9fdimyEhS+bVIrKzo3 jVQOQ/yLrHTrxl12GGSuk/MAWWrv+WLY9l38kBN3+Dd5pJ5K+U4HOs1RCsbAbQf3O4oH Pwo1xt1aCTvrq/nDvD4HduSxv99HX5E+maXewIoTe8uWLLe2+bXj5h3GtzzQV6x1NjK0 0Sejo46rZ/EJhfQILY+kIGCvGaCY1/ErkwxOLoqKgnJtlxMWj8sgeVFm3rP5/kpGzLiN 4jjw== X-Gm-Message-State: AOAM531TLAAv+uouxgNy0FY+RmBVAH6Kf4IHnPTyFJ9Tiaep/8UQGTdI nugGkv6fiGISIdavuRU6/2iLwN/W08/dADGOCux4VQ== X-Google-Smtp-Source: ABdhPJyH2qooLdafccnV5z+ZBU82is4eon7Xxy75LgeCjygNOkk23NrnAjI6C0Bhrv7s9SoJD2KS3uAUeLcKSBakYnc= X-Received: by 2002:a05:6602:2a4b:: with SMTP id k11mr2470720iov.85.1601488132303; Wed, 30 Sep 2020 10:48:52 -0700 (PDT) MIME-Version: 1.0 References: <20200923103706.GJ3179@techsingularity.net> <20200923154105.GO29330@paulmck-ThinkPad-P72> <20200923232251.GK3179@techsingularity.net> <20200924081614.GA14819@pc636> <20200925080503.GC3389@dhcp22.suse.cz> <20200925153129.GB25350@pc636> <20200925154741.GI3389@dhcp22.suse.cz> <20200930152517.GA1470428@google.com> <20200930164822.GX2277@dhcp22.suse.cz> <20200930172205.GY2277@dhcp22.suse.cz> In-Reply-To: <20200930172205.GY2277@dhcp22.suse.cz> From: Joel Fernandes Date: Wed, 30 Sep 2020 13:48:40 -0400 Message-ID: Subject: Re: [RFC-PATCH 2/4] mm: Add __rcu_alloc_page_lockless() func. To: Michal Hocko Cc: Uladzislau Rezki , Mel Gorman , "Paul E. McKenney" , LKML , RCU , linux-mm , Andrew Morton , Peter Zijlstra , Vlastimil Babka , Thomas Gleixner , "Theodore Y . Ts'o" , Sebastian Andrzej Siewior , Oleksiy Avramchenko , Mel Gorman Content-Type: text/plain; charset="UTF-8" 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 Wed, Sep 30, 2020 at 1:22 PM Michal Hocko wrote: > > > > I think documenting is useful. > > > > > > > > Could it be more explicit in what the issue is? Something like: > > > > > > > > * Even with GFP_ATOMIC, calls to the allocator can sleep on PREEMPT_RT > > > > systems. Therefore, the current low-level allocator implementation does not > > > > support being called from special contexts that are atomic on RT - such as > > > > NMI and raw_spin_lock. Due to these constraints and considering calling code > > > > usually has no control over the PREEMPT_RT configuration, callers of the > > > > allocator should avoid calling the allocator from these cotnexts even in > > > > non-RT systems. > > > > > > I do not mind documenting RT specific behavior but as mentioned in other > > > reply, this should likely go via RT tree for now. There is likely more > > > to clarify about atomicity for PREEMPT_RT. > > > > I am sorry, I did not understand what you meant by something missing > > in Linus Tree. CONFIG_PREEMPT_RT is there. > > OK, I was not aware we already CONFIG_PREEMPT_RT in the three. There is > still a lot from the RT patchset including sleeping spin locks that make > a real difference. Or maybe I haven't checked properly. > > > Could you clarify? Also the CONFIG_PREEMPT_RT is the only thing > > driving this requirement for GFP_ATOMIC right? Or are there non-RT > > reasons why GFP_ATOMIC allocation cannot be done from > > NMI/raw_spin_lock ? > > I have already sent a clarification patch [1]. NMI is not supported > regardless of the preemption mode. Hope this clarifies it a bit. > > [1] http://lkml.kernel.org/r/20200929123010.5137-1-mhocko@kernel.org That works for me. Thanks, - Joel