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=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS 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 39ACEC433E2 for ; Wed, 9 Sep 2020 21:49:22 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 9379E205CB for ; Wed, 9 Sep 2020 21:49:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="es56dcOc" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9379E205CB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id D90A06B0055; Wed, 9 Sep 2020 17:49:20 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D19FC6B0068; Wed, 9 Sep 2020 17:49:20 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C07CD6B006C; Wed, 9 Sep 2020 17:49:20 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0222.hostedemail.com [216.40.44.222]) by kanga.kvack.org (Postfix) with ESMTP id A7AF46B0055 for ; Wed, 9 Sep 2020 17:49:20 -0400 (EDT) Received: from smtpin16.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 6825F181AEF0B for ; Wed, 9 Sep 2020 21:49:20 +0000 (UTC) X-FDA: 77244864480.16.earth92_200997d270e0 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin16.hostedemail.com (Postfix) with ESMTP id 249F7100E6917 for ; Wed, 9 Sep 2020 21:49:20 +0000 (UTC) X-HE-Tag: earth92_200997d270e0 X-Filterd-Recvd-Size: 2284 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf43.hostedemail.com (Postfix) with ESMTP for ; Wed, 9 Sep 2020 21:49:19 +0000 (UTC) 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> X-Rspamd-Queue-Id: 249F7100E6917 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam04 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000697, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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.