Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4757240pxk; Wed, 30 Sep 2020 10:52:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxeIclhx2tvSVMiHfhcy8Jazt0IGc0a6tpyRKDC0jrwPNQnziTpFsGODzD2ceiow0M2JMWO X-Received: by 2002:a17:906:cf9d:: with SMTP id um29mr3985451ejb.74.1601488363382; Wed, 30 Sep 2020 10:52:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601488363; cv=none; d=google.com; s=arc-20160816; b=CB6pMMR2OnSFctVQ/UUNoWQ/U20/P3QR4u6+s6Q6H9lZwJAk/4FYLQ4We67pwKwJq1 JqyszYc4Q2wGWPGU6sBm5n+dJx1h2TzHs92YYHrNYz948wz+hZVI+NwVL+W2CIQrQdJm Eeja4kNZeZL4gV6XYfU6WZEMhyotPbXOYy5z2l0bSLgeYKbb996IUH2FbEQwqjI7Oe6z +Jde4N8Ro7nPw6h20G4aGHNJkE+3ilWs6XNfvuQuhIpZB2HZtlmhACNQ3P9EKkTGjpHz u44VrKIWhAXprzDCH9kEwYlhQeCzhJQV5j7jJTUcJJYlvKnuXh8XQ5+pIuMjX7+VuxzW /CUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=3QPmNeUX1bWiynEkFpQ8LFbxgXrdGF1ePUmA+g1hmvc=; b=bArnoDDM09ZEohPHJpAY/lbz/XqXNnVIwR9dJWBk/m6gHqnIiLm6sjAtntz9eJ8u66 uh3sq8dxXr2KE9BLFbffpJtNhFlmA3lnYNCpADjXuDBmuvVYJ0ehcWAi+gEnY2F3XuCx yCkzQP+HG/5Thd+ZP1fBmFCZWgQBHFL4uxV4lQYQdYVJVZAprdhpACz/xv9OFjyQNWFj jmH13ETNEy8/JTQ4VDmbsuT3Ao82Q41SYOhCf+UnML/v6eD6QnmWVIYRqNJJhYShvQ1A XO25xuLot6kNsyDyL/KO3XPdtq/9NqSVcytLdZ832o/06+6tvyPfUoBBoP0hWeUQu6VB MzUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=K+46e+Uo; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k2si1584203edx.169.2020.09.30.10.52.20; Wed, 30 Sep 2020 10:52:43 -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=@joelfernandes.org header.s=google header.b=K+46e+Uo; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725872AbgI3Rsx (ORCPT + 99 others); Wed, 30 Sep 2020 13:48:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35740 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725385AbgI3Rsx (ORCPT ); Wed, 30 Sep 2020 13:48:53 -0400 Received: from mail-io1-xd42.google.com (mail-io1-xd42.google.com [IPv6:2607:f8b0:4864:20::d42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3AA0BC0613D0 for ; Wed, 30 Sep 2020 10:48:53 -0700 (PDT) Received: by mail-io1-xd42.google.com with SMTP id y74so2795625iof.12 for ; Wed, 30 Sep 2020 10:48:53 -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=hAy86Gg+JAFifE8PPFcsE/tO/X18v1bGzNUewfUnqL3sSSZHzb+OFOeoMJOiSKMjT4 xPvygePXzPt1EYBUgY0CqxmRLhNoqjC+KiMFh3YkYr+C+mo0fAU+pjtkDRvNRVc9/ZWz 8Q1zgTHilEyJnsKVuXWhmZ+Hcb53TsdImrywK9HKmsl8v3pB5fP7d78uiAwxS2n8wtyY ui0JTgbpvNmcebDNcpj8Jf69bJNRAJxNQO5qrtctuT4zE7iIa519ukW8TcDzN/4lA4xr 2NXFh7WCCAiAuiNA2i5dC59buEibTkubpxeqcgeYNWfcpukyN5VpUnf+S6mS0Nd4TEeu 1KVw== X-Gm-Message-State: AOAM530dRRtJDib9AVwZgDpnH0PjpD3LnaoEHvApEAejc5om1G0yWfvq 5KRxq7xIRws2NjDiMC6VR6FOpZqSEU9vCQy8mjADMA== 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" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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