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=-9.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham 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 0F80AC4338F for ; Thu, 19 Aug 2021 07:02:19 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id AE55B61042 for ; Thu, 19 Aug 2021 07:02:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org AE55B61042 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 187136B0078; Thu, 19 Aug 2021 03:02:18 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 137B16B007B; Thu, 19 Aug 2021 03:02:18 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 025978D0001; Thu, 19 Aug 2021 03:02:17 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0141.hostedemail.com [216.40.44.141]) by kanga.kvack.org (Postfix) with ESMTP id DC2AA6B0078 for ; Thu, 19 Aug 2021 03:02:17 -0400 (EDT) Received: from smtpin07.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 754E418215EE2 for ; Thu, 19 Aug 2021 07:02:17 +0000 (UTC) X-FDA: 78490936314.07.E1A9012 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf25.hostedemail.com (Postfix) with ESMTP id EBAE0B00C76D for ; Thu, 19 Aug 2021 07:02:16 +0000 (UTC) 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 745511FD6E; Thu, 19 Aug 2021 07:02:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1629356535; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wowbubLfKZxqXhP7VGtsfXVE1u1A4NUI7JlK2axn1uk=; b=xWALV3j5tPwITsy9drhcAF/kexf/fDbLha7q7kNSki21hX2WyHSWbx44MTnL9laMF4H1pl GAwPrxmzc+p7Er+dudKpgTCqe6MS3OyTKzDgWRK6UGGa/iCv/u8Z6uBs4Xq859ANpSby04 4AVlkBsDop8sOI9IYrP/fUMS/4UgJhM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1629356535; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wowbubLfKZxqXhP7VGtsfXVE1u1A4NUI7JlK2axn1uk=; b=SPuBnFb9K8lJi+rTH2jVUwXHLMz+r/6V01fQa/ntXGP2RedE9C6OOBDDzKOqWu3OsIwFte QdCKsty9XL3MuOAw== 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 F22BF13D5D; Thu, 19 Aug 2021 07:02:14 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id uUoLOPYBHmEZegAAMHmgww (envelope-from ); Thu, 19 Aug 2021 07:02:14 +0000 Subject: Re: [PATCH] mm, vmscan: guarantee drop_slab_node() termination To: Kefeng Wang , Chris Down Cc: linux-mm@kvack.org, Andrew Morton , Muchun Song , Michal Hocko , Matthew Wilcox , Chunxin Zang References: <20210818152239.25502-1-vbabka@suse.cz> From: Vlastimil Babka Message-ID: <47437115-1a84-c1d1-d91e-1d23cf7f4a5d@suse.cz> Date: Thu, 19 Aug 2021 09:01:36 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: EBAE0B00C76D Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=xWALV3j5; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=SPuBnFb9; dmarc=none; spf=pass (imf25.hostedemail.com: domain of vbabka@suse.cz designates 195.135.220.29 as permitted sender) smtp.mailfrom=vbabka@suse.cz X-Rspamd-Server: rspam04 X-Stat-Signature: gnm8qjdj9qeg981aas39ojcgs4w1gqsy X-HE-Tag: 1629356536-131310 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 8/19/21 4:55 AM, Kefeng Wang wrote: > > On 2021/8/19 5:48, Chris Down wrote: >> Vlastimil Babka writes: >> >> I think this is a good idea, thanks for bringing it up :-) >> >> I'm not sure about the bitshift idea, though. It certainly makes sure >> that even large, continuous periods of reclaim eventually terminates, >> but I find it hard to reason about -- for example, if there's a lot of >> parallel activity, that might result in 10 constantly reintroduced >> pages, or 1000 pages, and it's not immediately obvious that we should >> treat those differently. >> >> What about using MAX_RECLAIM_RETRIES? There's already precedent for >> using it in non-OOM scenarios, like mem_cgroup_handle_over_high. It's an option, but then (together with fixed threshold) it ignores how large the 'freed' value is, as long it's above threshold? Although the end result will probably not be much different. > Yes, we meet this issue too, and we add a max loop limit in > drop_slab_node() in our kernel, which also could be reconfigured by > sysctl ;) Sysctl sounds like an overkill. How do you tune the limit? Any experience with what scenarios need what limit?