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=-5.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 2A0B3C433E2 for ; Wed, 9 Sep 2020 09:59:20 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A2F2121973 for ; Wed, 9 Sep 2020 09:59:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=chrisdown.name header.i=@chrisdown.name header.b="lYOXpY5k" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A2F2121973 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chrisdown.name Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id DF9B66B0037; Wed, 9 Sep 2020 05:59:18 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id DA8FA6B0062; Wed, 9 Sep 2020 05:59:18 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CE5A96B0068; Wed, 9 Sep 2020 05:59:18 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0253.hostedemail.com [216.40.44.253]) by kanga.kvack.org (Postfix) with ESMTP id B8B2A6B0037 for ; Wed, 9 Sep 2020 05:59:18 -0400 (EDT) Received: from smtpin15.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 73A548248047 for ; Wed, 9 Sep 2020 09:59:18 +0000 (UTC) X-FDA: 77243075196.15.rest26_36050cc270dc Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin15.hostedemail.com (Postfix) with ESMTP id 392241814B0C7 for ; Wed, 9 Sep 2020 09:59:18 +0000 (UTC) X-HE-Tag: rest26_36050cc270dc X-Filterd-Recvd-Size: 3787 Received: from mail-ed1-f68.google.com (mail-ed1-f68.google.com [209.85.208.68]) by imf12.hostedemail.com (Postfix) with ESMTP for ; Wed, 9 Sep 2020 09:59:17 +0000 (UTC) Received: by mail-ed1-f68.google.com with SMTP id l17so1986094edq.12 for ; Wed, 09 Sep 2020 02:59:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chrisdown.name; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=uPMqruMk4SDQT+ALFW5dQCv1EhNC+IuTKTg7lA6BnvM=; b=lYOXpY5kw+Jaz8EcIZLaUttGOkcZ+TNm+J6dq6gap07GPQqkhvQ442c7nS82t8GwY+ apOlHsi8vjhganiPUWzmxHBuW4ZMWhuyrp6o78A9NR+JHNUtVNNSizWDF8cDnnER7YnV j7DMC9w0lntF64fafUMvso7BzzPMi5ePTbEWU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=uPMqruMk4SDQT+ALFW5dQCv1EhNC+IuTKTg7lA6BnvM=; b=kcaaaAieviQxAnpd1/rEzxnPaneG5luvtZIHZH/jJdGMEy3Db0eF60tNkb9PxVfeSk tjgOH8qOCiANO2EjePJBcWYnIu5Mo8UnpvqBX1USME8yAwnZxvO4Kv9P9FeWjssugj+s THGfwsYUV6UGyDbJxNi1MPaTf15QbDjKRxy5tj/CXzdUiGlpQLPQJHHqfvxCdK9HjY/b 0705fuzOqdFrHRcwrWoGRhgM6rvMb7piIvIFcsDlwST8/LB3QAeHSR/NRuJCNgegzIC3 PiMZbhGLyBn71nA+x5p7T1WsZyOxJO9vDszgEYx0VKmpRYa79n55WtC/WrvXTJjF0eLI 5bAQ== X-Gm-Message-State: AOAM532RmbrQCVMYIA0+X+qQy4Bj8HL66156WJHdzDM6hWwwudDVV/yP CxYtRW3g47Rsx2Zx1VcTD+IHHg== X-Google-Smtp-Source: ABdhPJymF5qS6Ccow3hQ6AumA7SQr7+QCaXLRwptH1Hv/AQWQo0GwjJQZyDvsOIlVWzEi0Ahhs5GHg== X-Received: by 2002:a05:6402:50f:: with SMTP id m15mr3406910edv.41.1599645556723; Wed, 09 Sep 2020 02:59:16 -0700 (PDT) Received: from localhost ([2620:10d:c093:400::5:4614]) by smtp.gmail.com with ESMTPSA id r16sm1617107edc.57.2020.09.09.02.59.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 02:59:16 -0700 (PDT) Date: Wed, 9 Sep 2020 10:59:15 +0100 From: Chris Down To: Muchun Song Cc: zangchunxin@bytedance.com, Andrew Morton , Linux Memory Management List , LKML Subject: Re: [External] Re: [PATCH] mm/vmscan: fix infinite loop in drop_slab_node Message-ID: <20200909095915.GA1412646@chrisdown.name> References: <20200908142456.89626-1-zangchunxin@bytedance.com> <20200908150945.GA1301981@chrisdown.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.14.6 (2020-07-11) X-Rspamd-Queue-Id: 392241814B0C7 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam04 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: Muchun Song writes: >1. Double the threshold currently hard coded as "10" with each iteration > suggested by Vlastimil. It is also a good idea. I think this sounds reasonable, although I'd like to see what the difference in reclaim looks like in practice. >2. In the while loop, we can check whether the TASK_KILLABLE > signal is set, if so, we should break the loop. like the following code > snippe. Thanks. > >@@ -704,6 +704,9 @@ void drop_slab_node(int nid) > do { > struct mem_cgroup *memcg = NULL; > >+ if (fatal_signal_pending(current)) >+ return; >+ > freed = 0; > memcg = mem_cgroup_iter(NULL, NULL, NULL); > do { Regardless of anything, I think this is probably a good idea. Could you send it as a patch? :-) Thanks, Chris