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=-3.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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 10EBBC4363D for ; Thu, 24 Sep 2020 11:16:42 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 654DA2388A for ; Thu, 24 Sep 2020 11:16:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="EFQMCtvp" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 654DA2388A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id A0B8D90001B; Thu, 24 Sep 2020 07:16:40 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9BC13900017; Thu, 24 Sep 2020 07:16:40 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8825F90001B; Thu, 24 Sep 2020 07:16:40 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0009.hostedemail.com [216.40.44.9]) by kanga.kvack.org (Postfix) with ESMTP id 6EA42900017 for ; Thu, 24 Sep 2020 07:16:40 -0400 (EDT) Received: from smtpin26.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 222C5180AD802 for ; Thu, 24 Sep 2020 11:16:40 +0000 (UTC) X-FDA: 77297702160.26.stove60_3f1023a2715e Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin26.hostedemail.com (Postfix) with ESMTP id 088D91804B669 for ; Thu, 24 Sep 2020 11:16:40 +0000 (UTC) X-HE-Tag: stove60_3f1023a2715e X-Filterd-Recvd-Size: 3712 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by imf48.hostedemail.com (Postfix) with ESMTP for ; Thu, 24 Sep 2020 11:16:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=L0W7Y57hfB+sKNmMyauoXW4J1vjmTW/bBWQCemTSomo=; b=EFQMCtvpz0VPW66XEnnTwBcq8N tYhRh2uod3w6Q7FSpDE1sn4xQKpv3KWg1K2QSNaFTj/QggNtOG6Q2UKK3YRHEMeELGs//+iv0UV7l tUtjpxTIfrVajvIMBrYTB4c6spS91ujrobtXG6oyhGNCMYaFB8+qGNAEOS/BVhrBQP5tTeFOS8PkI MDSyq8HctjRptuqLmOJm0AjpcrbgDaBqrQovXwppvzhfXlUjtf81lCF7R5BMB8i0T7f1MrLOX7HyQ Ff00LG5TQsqIpfKn4rmUIDJY5XbouPeCo+pYDMLXfl0iBwgL13whg+w3+InWaTvsMsMiyu8fyGqsM DoytgZJw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kLPEo-0004PT-6z; Thu, 24 Sep 2020 11:16:34 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 61F27303DA0; Thu, 24 Sep 2020 13:16:32 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 4AD32203161DB; Thu, 24 Sep 2020 13:16:32 +0200 (CEST) Date: Thu, 24 Sep 2020 13:16:32 +0200 From: Peter Zijlstra To: Uladzislau Rezki Cc: Mel Gorman , "Paul E. McKenney" , Michal Hocko , LKML , RCU , linux-mm@kvack.org, Andrew Morton , Vlastimil Babka , 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: <20200924111632.GD2628@hirez.programming.kicks-ass.net> References: <20200921074716.GC12990@dhcp22.suse.cz> <20200921154558.GD29330@paulmck-ThinkPad-P72> <20200921160318.GO12990@dhcp22.suse.cz> <20200921194819.GA24236@pc636> <20200922075002.GU12990@dhcp22.suse.cz> <20200922131257.GA29241@pc636> <20200923103706.GJ3179@techsingularity.net> <20200923154105.GO29330@paulmck-ThinkPad-P72> <20200923232251.GK3179@techsingularity.net> <20200924081614.GA14819@pc636> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200924081614.GA14819@pc636> 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 Thu, Sep 24, 2020 at 10:16:14AM +0200, Uladzislau Rezki wrote: > Other option is if we had unconditionally enabled PREEMPT_COUNT config. > It would be easy to identify a context type and invoke a page allocator > if a context is preemtale. But as of now preemptable() is "half" working. > Thomas uploaded patches to make it unconditional. But it can be blocked. While I in principle support Thomas' patch, I think this is an abuse and still complete wrong. Not all preemptible() context can deal with GFP_KERNEL (GFP_NOFS existing should be a clue). !preemptible context cannot unconditionally deal with GFP_NOWAIT, consider using it while holding zone->lock. The preemption context does not say antying much useful about the allocation context.