Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4196524pxk; Tue, 8 Sep 2020 13:15:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw1QGgw64J/vgscxBaxt0u2pu1S30a5X4JTROur+p+cBe4ZpT30+ovbb0jV61UXFgSqzZ1/ X-Received: by 2002:a17:906:7f06:: with SMTP id d6mr127772ejr.553.1599596131171; Tue, 08 Sep 2020 13:15:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599596131; cv=none; d=google.com; s=arc-20160816; b=fEOgAI4MxZIDJIsZCiyb3xxBfYpTaMMTN3MNpLrtm0XpH2WacukVHQ0O/ueOoV2hLC tv2uAWPLHArfh4z8itE3q/7k+cj7m4M9H7ngs2+bIys0/bo/ANQD4oMCbOL/29+QayIh LSWNLIMtiSXvAkexgDUWOZrGilHq8T8sPgTQntitaTygQ7qyqG0vN1IaTg3E2FwyQpOR B8H/G+ARI0h4sWjHA6lxbVVjaWP59J7St+vRmBKdEMBrSDZxnsg6lfPJyGXxUa5UfxG2 QKI4gFZAOnopWECyry7nH0BJ9rt3ZuyGd1YJzt+glPMwyqk6cs2bT4o1fKWwdNQvc/ZW qLKQ== 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=qeNAwf96U+vrersmX6/zX5LAcMEPOlKjRQFFX9HVgVo=; b=Tza2Of/v4N95CD6393Fj6VYzC3kFDomNv32KBPYH3iyl6VdA6ItDWIBRP2sWxnSosk RojzLf2hoYS0X24fMK+c1r5OQC2v/sXbG0DM+egODPejkEBlEhkNFSwwTp8cWzq4N53l StxbAJ+moWckQmO2MzqaqlN+xvmubCSudWtMmMY9euHbIop79N/KAW/B+wleX4MrN1bM FNKtyWCG575mvJpw/Dxje7Abowyh4q/h9/DPMNct4WxAVeMSb5L+8N8Mfnx4H/LJ1v9X mc2MRaZrXR/coTe5w9SEHc5XVHU4YLOBH/mptb28B88dkBSO6p0yw86hN0uvCcXSLCUH TV6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chrisdown.name header.s=google header.b=d04XD4wu; 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 v13si62036eja.325.2020.09.08.13.15.08; Tue, 08 Sep 2020 13:15:31 -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=d04XD4wu; 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 S1729960AbgIHUNU (ORCPT + 99 others); Tue, 8 Sep 2020 16:13:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46798 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730097AbgIHPLM (ORCPT ); Tue, 8 Sep 2020 11:11:12 -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 13416C00459C for ; Tue, 8 Sep 2020 08:09:49 -0700 (PDT) Received: by mail-ed1-x543.google.com with SMTP id l63so16337729edl.9 for ; Tue, 08 Sep 2020 08:09:48 -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=qeNAwf96U+vrersmX6/zX5LAcMEPOlKjRQFFX9HVgVo=; b=d04XD4wuGYZKDFoeUGggqqzXwzd0VsEDo6lGpROBTOkED3kJI1+94j6ITiYOUVrlW7 un4Fs5b6mF3ge0DnXus6rBSJM+U7qyxKRB+WD9TCYpPVeq9KHU6VzdHDzX6axffUg1Ze tNgxHZmOUVWjGOubJIYSMS3BHyReZG57/KUfM= 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=qeNAwf96U+vrersmX6/zX5LAcMEPOlKjRQFFX9HVgVo=; b=Y8y4v959CqqzxXF1zix5kzcRbBmzbwptWb3oJBGtqaCie3iUG0wKlcXl7HsdYuGjz0 EjzipahzJ9wecMj1AG/ItFsXwK9bXYbM+ZI6YQDZ5CrSrZATeeX70bdhfoQgh0ZiUv2q AZwPvcL8WeB+YdArcAS1NAYa5mzfI5Z9XrdlJgOStZYmQtB35dnHCMrfmvYlD4AweiCG Ip22WaV7d9Cl8AbrBi7h4es+rg7+QS2OguU75zxCdavp/QqX3cNjfowaHxH3sAau7joz gzfgSaPtyYuyKggwrrrDfDIeXfsYWq6vF2+DDR8ievmGjYZzIQatgadPl6Z8kLGJIyeH rb0Q== X-Gm-Message-State: AOAM531JEQpAglYBoPHs0VD3KkMPtgcThw+i4iHtHfrR2fWJnrMtcLZB dgpQQ7/RfcuQn4LeHIz047FQrw== X-Received: by 2002:a05:6402:615:: with SMTP id n21mr26220771edv.59.1599577786255; Tue, 08 Sep 2020 08:09:46 -0700 (PDT) Received: from localhost ([2620:10d:c093:400::5:4614]) by smtp.gmail.com with ESMTPSA id y21sm6926839eju.46.2020.09.08.08.09.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 08:09:45 -0700 (PDT) Date: Tue, 8 Sep 2020 16:09:45 +0100 From: Chris Down To: zangchunxin@bytedance.com Cc: akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Muchun Song Subject: Re: [PATCH] mm/vmscan: fix infinite loop in drop_slab_node Message-ID: <20200908150945.GA1301981@chrisdown.name> References: <20200908142456.89626-1-zangchunxin@bytedance.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20200908142456.89626-1-zangchunxin@bytedance.com> 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 drop_caches by its very nature can be extremely performance intensive -- if someone wants to abort after trying too long, they can just send a TASK_KILLABLE signal, no? If exiting the loop and returning to usermode doesn't reliably work when doing that, then _that's_ something to improve, but this looks premature to me until that's demonstrated not to work. zangchunxin@bytedance.com writes: >In one drop caches action, only traverse memcg once maybe is better. >If user need more memory, they can do drop caches again. Can you please provide some measurements of the difference in reclamation in practice?