Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp634477pxk; Wed, 9 Sep 2020 14:50:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxTekyEB6561z0pxhIlZFF53P4l3EqanTugrSS9N4xfz5SLWjKCI2doHRpjhQxzo4Iv/DWG X-Received: by 2002:a17:906:2e83:: with SMTP id o3mr6005844eji.47.1599688232371; Wed, 09 Sep 2020 14:50:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599688232; cv=none; d=google.com; s=arc-20160816; b=kDuy5irP1OWPX6gfKOb93uD22usVm29r7AqAyQRxp1tVNMo62vE+v0B9k99z6kZqXJ ndd6d+VokF0b4VD7ECb4stOoyJ4knOr9l8mDCyCSz3twmd2pVyZJIzLhhDbtbyzqx8AV +ls0tv48sfa09ekblxRdlg+5D6/fYoXu+WzzBHY5y3lLsyFOosMENHOB+BPbf62+/epH +A41YvY91UdAUwel713kkm2HCqeC6nsi5TYIh/n/jJs4NAjJdb8HF3c8kSg9Ptb4wT5G 6zzT5mK826CfztoPaAMuc/Wa5XPihTl+OCuxekpW5mS4s3flmzjjlymgdztkaLW98KUm /lFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=HXIdUpByyG4qzsIKApPAxHn9z/7NYiDmd4oaoQuNQ6Y=; b=E9tqVa1lQjOX5sqWKs5VW2lzCU13bpCAUJuhZcxTs1qvNsSUfauDpUxnJz8QSx5KLH vn4sE8Ssb29BWdmN4Gkjxl7o64qNsfgPVA6r7BJPkMP/E4ZYlZS84ynHkmYpKFExW6IF 0zT3A4D+j37iQ3xmZ3IYxnZDrletP5Iv+TndNlA57HemFmZ4deEL5dp7M4lPjBr0mSyg FB12ItY7p6OO4c73+WDrYSZpRPdHv0taWj9o7Ko62Q+mBm4q7X0/boNExZeMs6vZ4l00 k1k3iwIBOUlHrlZcVlgO4FnUwSY7igFkL9Poj9FE7b2OqtLqGIlQnIg279cwxNLnUBW9 +92w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=es56dcOc; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dp1si2695476ejc.307.2020.09.09.14.50.09; Wed, 09 Sep 2020 14:50:32 -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=fail header.i=@infradead.org header.s=casper.20170209 header.b=es56dcOc; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726976AbgIIVtV (ORCPT + 99 others); Wed, 9 Sep 2020 17:49:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49780 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726440AbgIIVtR (ORCPT ); Wed, 9 Sep 2020 17:49:17 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 31808C061573 for ; Wed, 9 Sep 2020 14:49:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=HXIdUpByyG4qzsIKApPAxHn9z/7NYiDmd4oaoQuNQ6Y=; b=es56dcOcXXKCGaOzeKAMOjtmhq 4MSph/lwjOSVoCSqbDhjIiJEd1XMYkQ6YO45X5TPqeUn9aG95K3tvmqYBSQqLKUVEnFz1ls1Mt3QB KelVEdkr+tfQYlV8hTpKkHUHtd0HblJA8Bsw9z+kxOEQMIGM0TBzJjUcBYjIneI6e2dgMzbr0n+sR lzLFsds9XKOpd2goZR2GyXkC22vSP/Eh1NUZJcyTIpJtpSlcvhYt+q2GbxZqbRw16oME9h4XW9oLC s+pmmZiS9XkaipAeWgIXGRMuCiIri0xU1d4mRWdp5HWxnZ3H6cg1Dh4RFiqL5/f5+FVMpVLAOApc5 zQTsAfZQ==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kG7xo-0000N8-S5; Wed, 09 Sep 2020 21:49:12 +0000 Date: Wed, 9 Sep 2020 22:49:12 +0100 From: Matthew Wilcox To: Vlastimil Babka Cc: zangchunxin@bytedance.com, akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Muchun Song Subject: Re: [PATCH v2] mm/vmscan: fix infinite loop in drop_slab_node Message-ID: <20200909214912.GO6583@casper.infradead.org> References: <20200909152047.27905-1-zangchunxin@bytedance.com> <16906d44-9e3c-76a1-f1a9-ced61e865467@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <16906d44-9e3c-76a1-f1a9-ced61e865467@suse.cz> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 09, 2020 at 07:59:44PM +0200, Vlastimil Babka wrote: > - Exit also on other signals such as SIGABRT, SIGTERM? If I write to drop_caches > and think it's too long, I would prefer to kill it by ctrl-c and not just kill > -9. Dunno if the canonical way of testing for this is if > (signal_pending(current)) or differently. fatal_signal_pending() is the canonical way to do it. If your task has installed a signal handler for ABRT or TERM, that's its prerogative, but it's chosen not to get killed, and it's not allowed to see short reads/writes, so we can't break out early.