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.8 required=3.0 tests=BAYES_00, 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 79199C433DF for ; Tue, 18 Aug 2020 07:43:52 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 38A7A207FB for ; Tue, 18 Aug 2020 07:43:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 38A7A207FB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id D4E778D0009; Tue, 18 Aug 2020 03:43:51 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id CFD758D0003; Tue, 18 Aug 2020 03:43:51 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C13948D0009; Tue, 18 Aug 2020 03:43:51 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id ABAD98D0003 for ; Tue, 18 Aug 2020 03:43:51 -0400 (EDT) Received: from smtpin05.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 744A5362C for ; Tue, 18 Aug 2020 07:43:51 +0000 (UTC) X-FDA: 77162900262.05.heart09_11150402701d Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin05.hostedemail.com (Postfix) with ESMTP id 4F8CD18017806 for ; Tue, 18 Aug 2020 07:43:51 +0000 (UTC) X-HE-Tag: heart09_11150402701d X-Filterd-Recvd-Size: 3240 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf40.hostedemail.com (Postfix) with ESMTP for ; Tue, 18 Aug 2020 07:43:50 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 24540ABCC; Tue, 18 Aug 2020 07:44:15 +0000 (UTC) Date: Tue, 18 Aug 2020 09:43:44 +0200 From: Michal Hocko To: "Paul E. McKenney" Cc: Uladzislau Rezki , Peter Zijlstra , Thomas Gleixner , LKML , RCU , linux-mm@kvack.org, Andrew Morton , Vlastimil Babka , Matthew Wilcox , "Theodore Y . Ts'o" , Joel Fernandes , Sebastian Andrzej Siewior , Oleksiy Avramchenko Subject: Re: [RFC-PATCH 1/2] mm: Add __GFP_NO_LOCKS flag Message-ID: <20200818074344.GL28270@dhcp22.suse.cz> References: <20200814141425.GM4295@paulmck-ThinkPad-P72> <20200814161106.GA13853@paulmck-ThinkPad-P72> <20200814174924.GI3982@worktop.programming.kicks-ass.net> <20200814180224.GQ4295@paulmck-ThinkPad-P72> <875z9lkoo4.fsf@nanos.tec.linutronix.de> <20200814204140.GT4295@paulmck-ThinkPad-P72> <20200814215206.GL3982@worktop.programming.kicks-ass.net> <20200816225655.GA17869@pc636> <20200817082849.GA28270@dhcp22.suse.cz> <20200817222803.GE23602@paulmck-ThinkPad-P72> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200817222803.GE23602@paulmck-ThinkPad-P72> X-Rspamd-Queue-Id: 4F8CD18017806 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam02 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 Mon 17-08-20 15:28:03, Paul E. McKenney wrote: > On Mon, Aug 17, 2020 at 10:28:49AM +0200, Michal Hocko wrote: > > On Mon 17-08-20 00:56:55, Uladzislau Rezki wrote: > > [ . . . ] > > > > wget ftp://vps418301.ovh.net/incoming/1000000_kmalloc_kfree_rcu_proc_percpu_pagelist_fractio_is_8.png > > > > 1/8 of the memory in pcp lists is quite large and likely not something > > used very often. > > > > Both these numbers just make me think that a dedicated pool of page > > pre-allocated for RCU specifically might be a better solution. I still > > haven't read through that branch of the email thread though so there > > might be some pretty convincing argments to not do that. > > To avoid the problematic corner cases, we would need way more dedicated > memory than is reasonable, as in well over one hundred pages per CPU. > Sure, we could choose a smaller number, but then we are failing to defend > against flooding, even on systems that have more than enough free memory > to be able to do so. It would be better to live within what is available, > taking the performance/robustness hit only if there isn't enough. Thomas had a good point that it doesn't really make much sense to optimize for flooders because that just makes them more effective. > My current belief is that we need a combination of (1) either the > GFP_NOLOCK flag or Peter Zijlstra's patch and I must have missed the patch? -- Michal Hocko SUSE Labs