Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp228062pxk; Thu, 24 Sep 2020 04:20:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxHcIUoR86DRf7kE5JTVz+h8qvzWOWxASYZgihKmcUHhFuwdlsQAmNVQV267DXdQwVS/Nkg X-Received: by 2002:a17:906:d9d9:: with SMTP id qk25mr448748ejb.51.1600946430373; Thu, 24 Sep 2020 04:20:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600946430; cv=none; d=google.com; s=arc-20160816; b=rLxV9Hof6WKZmPT+/9s3St8Ue6rh+OYJCkzyOqN5c/Wjiwt7uFYf5Ce6RPL6sbTjVA mORjZYZFBsxrv1WK+CsSea0niQlYAFq8e1r6zFg0ehXi80zngIPZw14lJ6KYvTipRW09 spGNq+/dI2noyY5iJ4yadq4vOIaXUwVm1WCSsaBZLwiiYFht6Zoeze8/98xNIUO1DiIy DiPJD/IqEjDh+XX8SKzFbuE9MqE37G6ATEmcmV2YPBTNeU9PaBwj12N2iYDdccaCoQTH NK1hRsep9cwT+80xQVmiItvTCYkyn9I7FFDBkVFhXjZ2BKmYcnyRg97oB4QHVKhYxpLP j4pg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=L0W7Y57hfB+sKNmMyauoXW4J1vjmTW/bBWQCemTSomo=; b=pa9wIqz1zdguh+a43sntO5o4VaiV1btHm6ih+7bUSzyhDJWpRu8P1eKRMALHikhk2C kIEe/M/ukycUwEzgeI631PvvTIpyHFMFRMJzRBouYSktyKH8+zUhYAAWXWyOR4nTvMIE xG1vQGoTcQNvLzXY8RRSq5bK8YOvRR+4Xq9qsIxz737OXynZYup3miGqb6Kiz0ixFZkp Q1L5IanjqfpEyQdVXYauflvXxHK79d3HJRHkAtYEwP0xHXWP337jE7ddi9adK7A7qxCa VMICgPdn9BodlOAiwej+cfp2FL9ehN5G5e/RpeNht4xGrfAgOHeFZ01WIMTJLq5QccF5 10Ew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=merlin.20170209 header.b=EFQMCtvp; 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 j2si1919950edt.312.2020.09.24.04.20.07; Thu, 24 Sep 2020 04:20:30 -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=@infradead.org header.s=merlin.20170209 header.b=EFQMCtvp; 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 S1726715AbgIXLQu (ORCPT + 99 others); Thu, 24 Sep 2020 07:16:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56262 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726483AbgIXLQu (ORCPT ); Thu, 24 Sep 2020 07:16:50 -0400 Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B7D76C0613CE; Thu, 24 Sep 2020 04:16:49 -0700 (PDT) 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> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.