Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp394367pxk; Wed, 9 Sep 2020 08:08:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyJfGbjFzcseiC9HECY5gz7CKIdifQPqDeJK2CBqAQLWVVbJaSGPeqn0aVUw74pyZ4Tboe9 X-Received: by 2002:a17:907:728e:: with SMTP id dt14mr3959677ejc.505.1599664082220; Wed, 09 Sep 2020 08:08:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599664082; cv=none; d=google.com; s=arc-20160816; b=naF2WuToh8Qs0afqwP7uSNtB7dKwzCsbiEZuKvi2zRGY8bzNk4WMvqI9lukJFgqojO iViFivgrvWKEIysmCXuBYR25E4stH+9c6Xmu3CtndmJbxYNojSRzGftTnLIKFWITaHg/ Zg4L+KWAQXYzyKbK9D4+9dhEgmjQ5KHYlC7dNqWBoH6lVTWzaAn3Em4kvmWPHy1ntUMm dadA4/jzTJPznvgrZ+p0eY0Td6wr/lpfiLfRoDrzpkesx38xPzLYSwvqU8G6iNvAV7CD Arzsu0LxGgIKjNnWrciXYg4+uo1I7zw0w8IrQStbsIHuoY0nQGUVIAEB7e1ukbmXpyaH yKVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=3CSI24S8plBTXtRgEcDOdjCLZsD8Xjzm/x3QvW5GzzA=; b=NJ8k/QrXe7OQlF9wnvsd0vpEb4gj15VI+WSJTBk9/gQ5YQw45d9K85u+7FSXniZU1q um2IWW1PhBUw+EUxuEOnI0y+kS9vUNyvPyQLO3BFf482yz0w1+qlN0E1vR74t4WVGMg2 JpqcLmmAcbzBQDdTjqXlcXLSvCyFtciuvRgZK+roU060RP39daHp4RXxrZVQx69iM3h5 aXMVLyh5tWLDnXM/E+hdQ/oOo+nAEfibM4XfgLy2i/UKBqOvUGw6AbwPhlWWJqvrH2IJ gkv/rylENcyjXlCZmnaQ4Vu2OrPhviUrZtVWsjyKiTbUbXZ/B7QFJEL6ZJgpS6O3YnzP 6QVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance-com.20150623.gappssmtp.com header.s=20150623 header.b=CrxiqY4e; 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=fail (p=NONE sp=NONE dis=NONE) header.from=bytedance.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m18si1567413eja.292.2020.09.09.08.07.38; Wed, 09 Sep 2020 08:08:02 -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=@bytedance-com.20150623.gappssmtp.com header.s=20150623 header.b=CrxiqY4e; 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=fail (p=NONE sp=NONE dis=NONE) header.from=bytedance.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730369AbgIIO7i (ORCPT + 99 others); Wed, 9 Sep 2020 10:59:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730116AbgIIMWW (ORCPT ); Wed, 9 Sep 2020 08:22:22 -0400 Received: from mail-pj1-x1043.google.com (mail-pj1-x1043.google.com [IPv6:2607:f8b0:4864:20::1043]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B517EC061796 for ; Wed, 9 Sep 2020 05:11:15 -0700 (PDT) Received: by mail-pj1-x1043.google.com with SMTP id n3so1238251pjq.1 for ; Wed, 09 Sep 2020 05:11:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=3CSI24S8plBTXtRgEcDOdjCLZsD8Xjzm/x3QvW5GzzA=; b=CrxiqY4eqzLovv8Iwz2sAdv/R4dvPyNaEFS0bl0Q+eQt7YSX9DLk69dRuVBaBnrwPC dwVAaK9uxYzBLmAen/KHnYGaWDrzgLDsfx6T4RyahPeFdLRkP2buCCet/pe1TM5R5u2+ qQh+wQMV7HSCveHSET/gSe12NjhmDGKAwhuooc8xiJ/6oCr/2bvkwQ7TIpSpu1fQ9gT3 uBOLib7VicZvdfGzBIFiOEpzy3rFbuaG+lLUIlSPI3Yx0IjLBBXZhziDHGXZgWC/isaM o1HzfXUgWdjlOMoTc6KbAWnC1rcRnvfBQIAgDTG0LxaH/ur8p/t6j4YdTsfDhV8NUT5O gr7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=3CSI24S8plBTXtRgEcDOdjCLZsD8Xjzm/x3QvW5GzzA=; b=AQn71Di0OFpqTZG2BqO5Kkw3l2sfRv8IOhe7LlhxULuOFQmKZIUSgTTecf6ciKrQvY 5SCEtR+WkRuK1eFCcdOUZfidbX+k3EVBqI2edz7KHdkB1C6L091nStP+TTS3lzWHy0UI fxc0TgGVZGA2Z81h8W7pUXSQiMCozUc43E5ps61nEmzc4tZmWaghOmLLispIymQJ/S0m GCmR+WJW8Mo41h5m/BzWD4qq1mZNan9GVdnPOxYPmC29zWdwkmeWGAltOnOWihj7LTsJ ByEN1v7dZL87jqLC6O69QfXKKrWKcGnzN84a0ituTvFBjcajGDWW4Dl/QcY6vEWu8eWz qlvA== X-Gm-Message-State: AOAM532wbjBMGZjJFZbGOryGoZTM5XB3AngEcYC+AMLmRo7zVdSQSMKy v+t+qlrk8CeeBrnbW0ZwJmpugQFKlnxQ8Cjlvata+g== X-Received: by 2002:a17:90a:bd0e:: with SMTP id y14mr577786pjr.13.1599653475051; Wed, 09 Sep 2020 05:11:15 -0700 (PDT) MIME-Version: 1.0 References: <20200908142456.89626-1-zangchunxin@bytedance.com> <20200908150945.GA1301981@chrisdown.name> <20200909095915.GA1412646@chrisdown.name> In-Reply-To: <20200909095915.GA1412646@chrisdown.name> From: Muchun Song Date: Wed, 9 Sep 2020 20:10:38 +0800 Message-ID: Subject: Re: [External] Re: [PATCH] mm/vmscan: fix infinite loop in drop_slab_node To: Chris Down Cc: zangchunxin@bytedance.com, Andrew Morton , Linux Memory Management List , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 9, 2020 at 5:59 PM Chris Down wrote: > > 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? :-) OK, Will do that thanks. > > Thanks, > > Chris -- Yours, Muchun