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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3A56AC54FB9 for ; Thu, 16 Nov 2023 12:55:05 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id AC8616B044E; Thu, 16 Nov 2023 07:55:04 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id A78BD6B0451; Thu, 16 Nov 2023 07:55:04 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 93F8F6B0452; Thu, 16 Nov 2023 07:55:04 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 83C9D6B044E for ; Thu, 16 Nov 2023 07:55:04 -0500 (EST) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 4D30A1A02C9 for ; Thu, 16 Nov 2023 12:55:04 +0000 (UTC) X-FDA: 81463812528.05.62891FC Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf30.hostedemail.com (Postfix) with ESMTP id 46A7D80007 for ; Thu, 16 Nov 2023 12:55:02 +0000 (UTC) Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=Om8ErrW1; spf=pass (imf30.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.29 as permitted sender) smtp.mailfrom=mhocko@suse.com; dmarc=pass (policy=quarantine) header.from=suse.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1700139302; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=9DveYl2C6FfM3RZYlQpat22MNtL8btHRXeLgT2LqG/g=; b=504e96EmBcfzc8KD7GMjWWpPYDm1JXxacqsj9BeFYP651n+3mtcYrhMTSaDr3ZRLHKXYJf dX5XitOKUD/l0CeC/14YHa60n8GrT6p7PjchNhGuZbAOVTQLjc1Z4R9SV/0IlIFD+CyWPt 5qnXvHswBtcfv4b+9eG/OTAt3/qLG6s= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1700139302; a=rsa-sha256; cv=none; b=yDSj6NGI3otuqtm9Gm68siu1DeE5ZKnfhocPt0VMNDb8pGBPU7JsXzCb7VF01MdU7mn5sk DjHnm6hGvcOGor8UlnCB6NizZVRLZ7gtoIyXqiwyZdY6TSnyC0c/sMJtd4TW6/GB0/1ODn u6en5grD+8terDHdsuRfD1SEgr03JpU= ARC-Authentication-Results: i=1; imf30.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=Om8ErrW1; spf=pass (imf30.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.29 as permitted sender) smtp.mailfrom=mhocko@suse.com; dmarc=pass (policy=quarantine) header.from=suse.com Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id DA2A320502; Thu, 16 Nov 2023 12:55:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1700139300; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=9DveYl2C6FfM3RZYlQpat22MNtL8btHRXeLgT2LqG/g=; b=Om8ErrW13Eo6bOTRo/nHkPzA4W+Kci4T6STNZsP/PldhsCbBL7WLPH/kSek8aTLS589+12 nTPfTvhK6D4TFIQSo+ALEsNmd+NOw1iYSp5EIgpuPAtWStfjLUlipTIVBwt0Xa4RJa4egi Bx26t9zX4BgBWYssTE/sjmCC80ZXW4w= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id BF6391377E; Thu, 16 Nov 2023 12:55:00 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id OzuxKyQRVmU9fAAAMHmgww (envelope-from ); Thu, 16 Nov 2023 12:55:00 +0000 Date: Thu, 16 Nov 2023 13:55:00 +0100 From: Michal Hocko To: Charan Teja Kalla Cc: akpm@linux-foundation.org, mgorman@techsingularity.net, david@redhat.com, vbabka@suse.cz, hannes@cmpxchg.org, quic_pkondeti@quicinc.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH V3 3/3] mm: page_alloc: drain pcp lists before oom kill Message-ID: References: <5c7f25f9-f86b-8e15-8603-e212b9911cac@quicinc.com> <342a8854-eef5-f68a-15e5-275de70e3f01@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 46A7D80007 X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: hsxqi1een7mzmtxe4udaue85pk17zsfa X-HE-Tag: 1700139302-6432 X-HE-Meta: U2FsdGVkX19ap186Qns4dNvtlHEk6kOtvi+hySePn/jQZD64W6c+BdWJnKiN4JBCJsFH9GfR5v+QMRLl+ta4X5EVyCCHiHZJ9SyCifVdM/sU8e4UArCSVBMJ9Y8tZaHJz7+pMqojR8svcxR0iqo2rL42+FmqL57Dc1dpnJug9A0odY6YN8vPnVg7TNK6lL7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owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On Thu 16-11-23 11:30:04, Charan Teja Kalla wrote: > Thanks Michal. > > On 11/15/2023 7:39 PM, Michal Hocko wrote: > >> Also If you have any comments on [PATCH V2 2/3] mm: page_alloc: correct > >> high atomic reserve calculations will help me. > > I do not have a strong opinion on that one to be honest. I am not even > > sure that reserving a full page block (4MB) on small systems as > > presented is really a good use of memory. > > May be other way to look at that patch is comment is really not being > reflected in the code. It says, " Limit the number reserved to 1 > pageblock or roughly 1% of a zone.", but the current code is making it 2 > pageblocks. So, for 4M block size, it is > 1%. > > A second patch, that I will post, like not reserving the high atomic > page blocks on small systems -- But how to define the meaning of small > systems is not sure. Instead will let the system administrators chose > this through either: > a) command line param, high_atomic_reserves=off, on by default -- > Another knob, so admins may really not like this? > b) CONFIG_HIGH_ATOMIC_RESERVES, which if not defined, will not reserve. Please don't! I do not see any admin wanting to care about this at all. It just takes a lot of understanding of internal MM stuff to make an educated guess. This should really be auto-tuned. And as responded in other reply my take would be to reserve a page block on if it doesn't consume more than 1% of memory to preserve the existing behavior yet not overconsume on small systems. > Please lmk If you have any more suggestions here? > > Also, I am thinking to request Andrew to pick [PATCH V2 1/3] patch and > take these discussions separately in a separate thread. That makes sense as that is a clear bug fix. -- Michal Hocko SUSE Labs