Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp195566pxk; Wed, 9 Sep 2020 03:01:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxk+3HuLMD3jn2rLbb4FDC7CHmQ0ixHlghffbJSpUMNvRl/bizuB3PBRQDeWI9Sy2YfJXco X-Received: by 2002:a17:906:bb06:: with SMTP id jz6mr2979220ejb.248.1599645681274; Wed, 09 Sep 2020 03:01:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599645681; cv=none; d=google.com; s=arc-20160816; b=J8KkRMh5SEu89W3755pNxZlce1rkBTaQqZ/MFDLL4a4X3z+znQ1IR0W42C+YtFuhp0 uTfxWNh/do7NrxJUcKKURldf+sJj2VmtkgoOi1XoZN78OBxPZcfUrxAJOj95d8cnf4ol 5zT4wNZ7fELtn9LtxH9gAc3yzRbcdv+TNQizjhee8OYjUvtK00i8D0LLmDADfmDT9LHo I6t6WGM6h9ucbtXXWYu26Ntj9Q1rjyIgJ8r2keBMSdaT3SigKnRK9n44eA+sDvrKWKlz uccSjCvzcT4rVGqwtc3Lzc7pD/ynEAEwPhMvcaIby+xMfcxrvc6c5igMfsvKB3F+JTeP EyOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=uPMqruMk4SDQT+ALFW5dQCv1EhNC+IuTKTg7lA6BnvM=; b=AJWO1/B+QFldqAe2omjt3IvqHOr03Z67yuyrinu4xLUKX19xAQ4/SLeOrfMHxO5F/G 2JUtNbaB2GoD4/xp8ujcCX1DDYfCoiC1p4I4vK47aFaw/zqiqeUg15t5nfW/q1TYzk67 zS+9AGqyG3T+2+oyBGSDueZugfEHM2fQ8ZosQ3gKoBqVcqIXGCvnj8WbPztz3HPqgO8f oBGe+09cQ2FBJQNSUjTJRX5YOTlbIe9hxbD1tWzEjqdSUplhCkg4aNcs2gR0xaQEhTka XgIq5RM1EM0OxXehJWVsO56ZigwHkyGzMo5N1UP2gLPBi2qZpz6yBATIYDQJBWjJJzLN FdbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chrisdown.name header.s=google header.b=lYOXpY5k; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chrisdown.name Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d4si1168972ejt.59.2020.09.09.03.00.56; Wed, 09 Sep 2020 03:01:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chrisdown.name header.s=google header.b=lYOXpY5k; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chrisdown.name Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727936AbgIIJ7V (ORCPT + 99 others); Wed, 9 Sep 2020 05:59:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52582 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726408AbgIIJ7S (ORCPT ); Wed, 9 Sep 2020 05:59:18 -0400 Received: from mail-ed1-x543.google.com (mail-ed1-x543.google.com [IPv6:2a00:1450:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0798BC061573 for ; Wed, 9 Sep 2020 02:59:18 -0700 (PDT) Received: by mail-ed1-x543.google.com with SMTP id c8so2023213edv.5 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=MAjD4Hz2s0LUI/0d6QRT33UrF4FG2ikCckIfmk0TkIUyDRdK9WbjaIw912Kat5b9in 7B5xiyjM4rUXHDATMObTXzK/EK2KkZAPA/H7S7gWS1jcmFJedTH76941JFVlDK5fxkDa aXsPNrmTAJLwpSCPvoYCQsDCbmtnE5J3+vi6E4mLRBxDTk2Bjsx8xxGhGQ6Et5TNs/Hk 8FbhQyC0TeiCXlAOX58qocEY8ffPllbJMSUwMwYw3Hyfqv1mthCHCdAqEkpSWvaZK7S6 kWx+yCxV7MQc30BBTfVE0+AVcX19BxPdIbmKdlZDN/U9+L73omYiN8gE18zNgJSNUWf/ QWeA== X-Gm-Message-State: AOAM532BXDMKlLN7r+QW02bAB4GFO2jrSsU1oxcSCPseU/38rB/bunf4 QVwUnWbJHD+Zd3dnFYrqJJO62A== 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) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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