Received: by 2002:a05:7412:b101:b0:e2:908c:2ebd with SMTP id az1csp2619327rdb; Wed, 15 Nov 2023 06:10:58 -0800 (PST) X-Google-Smtp-Source: AGHT+IHL1k8EaOkX8HAVeI8RvP0Nvt0Wc6NR+06MbjO8y7k0XNGxmqPIzqITK1mZ2LpTbWHkzoq0 X-Received: by 2002:a17:902:ab52:b0:1c4:56c8:27f8 with SMTP id ij18-20020a170902ab5200b001c456c827f8mr4093222plb.68.1700057458156; Wed, 15 Nov 2023 06:10:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700057458; cv=none; d=google.com; s=arc-20160816; b=GMGsdse/EvaKsbrOpiFca7Ul1qCSRlEZyBslGfHbrx5yuBdTCdVvhV/Kum+4XbRVOV /XUk4+fM343niH3zPbhKQDCqXPL/7uuAhkDmcuSkfeBqTwUxb7zvOnSg4/uZd/ORf1+Q /z8cCn3g/tZh8XZ3/lDc9xtacQdom8ikXeaQNKbHxfOAQf/1V7QPY26/Bk2KrcujY59V zzR/iHcrsvldmG13mEY+AWv8+LmltE3yA+zCc8tweMCXRQCN+NC/qG8pxEvxR/EQq4Pi f0RMacVOR6vMgt661DLXwtV/ev166F+jrhYqKzpwEIKUzj5E5muGHq9dlIrSmOMNWcEy lIeQ== 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=ziC0owFfoL33apf8R/x/Rrhz8VjbOAJrdvgUnGBfRxk=; fh=bMJDk+jwIY9eXm0BrFavcLKheFQTj56zcu3U6AM8ZKc=; b=HR3aAz3oXYI7dvfsFiC5sph8CZRFy6U/3LnaXPja1uBvMHVmKCx4Dhf/Z2Yo9CxjT1 cOoXc50m6ZZfwhPgKF//IV3d9c58xdJ9xkp35L7r/FVy8eKJ54OR5XqvEdEXhQyXq7EZ +VT28WvPnIP/HDnVzPR4/XdhAr/n/jrR9UA9kir5Ylu5jyEQR4eRqohyOn9hJrfT/r6d sX+lIa4JqDgA43MXzQ3qNE1DMqNkPmZIvgQhSt3tAGA2hNXWn+CwvKE2IunCN6dgqydJ hi43HnTdM36K/s2GFEvDNXiSRz69w8gg0fzrKMaH6RVvYg8yNfynbnyLUTnkr0HZyaZi Yptw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b="rjdJ/xwY"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id e14-20020a17090301ce00b001c9fe071f2bsi10754395plh.8.2023.11.15.06.10.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Nov 2023 06:10:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b="rjdJ/xwY"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id D6ADA807D0E8; Wed, 15 Nov 2023 06:10:09 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344133AbjKOOJ5 (ORCPT + 99 others); Wed, 15 Nov 2023 09:09:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33702 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234924AbjKOOJv (ORCPT ); Wed, 15 Nov 2023 09:09:51 -0500 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EBDB7188 for ; Wed, 15 Nov 2023 06:09:47 -0800 (PST) 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-out1.suse.de (Postfix) with ESMTPS id 0C395218B2; Wed, 15 Nov 2023 14:09:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1700057386; 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=ziC0owFfoL33apf8R/x/Rrhz8VjbOAJrdvgUnGBfRxk=; b=rjdJ/xwYpj17GNAvoaf1I7+UTjDrp7xW5/P0GpOIXXSJBpZcqsKcbvRushWCo+rQmA9FBP hqxWZG5qLNaeKPC8PGkWC08FzxWtd4EPPaOccGLuowqfRZqRVd1tvwk6XESEpoRTEaOb4T CnfYdxfY5m3Iym86FkSiLgbDB0F60R8= 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 D68F313587; Wed, 15 Nov 2023 14:09:45 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 6t+6LSnRVGXgVAAAMHmgww (envelope-from ); Wed, 15 Nov 2023 14:09:45 +0000 Date: Wed, 15 Nov 2023 15:09:45 +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: <342a8854-eef5-f68a-15e5-275de70e3f01@quicinc.com> Authentication-Results: smtp-out1.suse.de; none X-Spam-Level: X-Spam-Score: -8.98 X-Spamd-Result: default: False [-8.98 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-3.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; REPLY(-4.00)[]; DKIM_SIGNED(0.00)[suse.com:s=susede1]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RCPT_COUNT_SEVEN(0.00)[9]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; MID_RHS_NOT_FQDN(0.50)[]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-1.38)[90.73%] X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Wed, 15 Nov 2023 06:10:10 -0800 (PST) On Tue 14-11-23 22:06:45, Charan Teja Kalla wrote: > Thanks Michal!! > > On 11/14/2023 4:18 PM, Michal Hocko wrote: > >> At least in my particular stress test case it just delayed the OOM as i > >> can see that at the time of OOM kill, there are no free pcp pages. My > >> understanding of the OOM is that it should be the last resort and only > >> after doing the enough reclaim retries. CMIW here. > > Yes it is a last resort but it is a heuristic as well. So the real > > questoin is whether this makes any practical difference outside of > > artificial workloads. I do not see anything particularly worrying to > > drain the pcp cache but it should be noted that this won't be 100% > > either as racing freeing of memory will end up on pcp lists first. > > Okay, I don't have any practical scenario where this helped me in > avoiding the OOM. Will comeback If I ever encounter this issue in > practical scenario. > > 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. -- Michal Hocko SUSE Labs