Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp648290pxk; Wed, 9 Sep 2020 15:16:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx+154gG00XkwONXZh7rJ36FIy/9KSBuAZYv2nDc4FtCSAmPSXtEki3z46bt52UreBIZqXq X-Received: by 2002:a50:875c:: with SMTP id 28mr6359036edv.20.1599689816654; Wed, 09 Sep 2020 15:16:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599689816; cv=none; d=google.com; s=arc-20160816; b=rfQuPLZTzyg8IXdIjc0NCwwK6TysnA1FC/+3Gw37JkRAWWmXcp6hBoyLCQjVO5mGKy oGli+CQU6MdCMhYHTwdcZUeVtldQYCh8YYL8mXQHScPw0A5aF13ITB8TjYtIQYDWr3sX XqnGJvWDJ3H9LTk0kyrDjUQb2Zo8fdnAcA0mJx2jXSBmMnH64Hm1r+AgRbhwGfXtkF6W 4XqwJVKw7uNcC2qOAx50UK/JamfONPey2032ewbHRE1pm/qnwgKp7vpFCsY7oF1/+xn3 qn8Se2UaNKk9eqMPBdVwrf5WuCx+d0HU70Jz130ymlMwv7Pw9r+9+npImARqXZTo9qlQ x9yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=lz1N9IDKSPqGadEfF99O8vPB8tXmAZ4SLteng0y/PX8=; b=GPCBhUxpWRTC8IKTAa1tJlI5uVgsTAPWdxY6Nl5TWGf4XHCbMGxcJLIrfBX+cAIoSw qciqBaVEVi3AJL5oRnZ12FTclT8sDSgLPmtEOqTB9IkIcc+7a4FMLOhO/etFHLKzhdSI cyDgAJzOPI50bPlHPm2RZX6jLxpnjzIpKcliroQL1VJYWufk2vTzS1SUf5PGP3jYLVfa nbC0mETq5q4KcEdVPu8Qr4391nQShmEGZhuoNLMy2MTE4Ainhg+aSKAhTgpfVRw8qr5y TrDos0dhCOQ2ZaSu51i5D40odBGTt99E/4g64FDCXmMCsVrHCxF7hxT599l3HT5DH70w DhfQ== ARC-Authentication-Results: i=1; mx.google.com; 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 z70si2410440ede.247.2020.09.09.15.16.32; Wed, 09 Sep 2020 15:16:56 -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; 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 S1728350AbgIIWNw (ORCPT + 99 others); Wed, 9 Sep 2020 18:13:52 -0400 Received: from mx2.suse.de ([195.135.220.15]:48672 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726726AbgIIWNu (ORCPT ); Wed, 9 Sep 2020 18:13:50 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id B20C3ACDF; Wed, 9 Sep 2020 22:14:04 +0000 (UTC) Subject: Re: [PATCH v2] mm/vmscan: fix infinite loop in drop_slab_node To: Matthew Wilcox , Chris Down Cc: zangchunxin@bytedance.com, akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Muchun Song References: <20200909152047.27905-1-zangchunxin@bytedance.com> <16906d44-9e3c-76a1-f1a9-ced61e865467@suse.cz> <20200909214724.GA1577471@chrisdown.name> <20200909215209.GP6583@casper.infradead.org> From: Vlastimil Babka Message-ID: <4e022a8c-68da-a322-4101-926a0bb9d44b@suse.cz> Date: Thu, 10 Sep 2020 00:13:48 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: <20200909215209.GP6583@casper.infradead.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/9/20 11:52 PM, Matthew Wilcox wrote: > On Wed, Sep 09, 2020 at 10:47:24PM +0100, Chris Down wrote: >> Vlastimil Babka writes: >> > - 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 >> >> Oh dear, fatal_signal_pending() doesn't consider cases with no more >> userspace instructions due to SIG_DFL on TERM/INT etc, that seems misleading >> :-( I had (naively) believed it internally checks the same set as >> TASK_KILLABLE. >> >> Chuxin, Muchun, can you please make it work using TASK_KILLABLE in a similar >> way to how schedule_timeout_killable and friends do it instead, so that >> other signals will be caught? > > You're mistaken. Ah actually it was me who thought fatal_signal_pending() was only for SIGKILL, OOM and whatnot. Sorry for the noise. > if (sig_fatal(p, sig) && > !(signal->flags & SIGNAL_GROUP_EXIT) && > !sigismember(&t->real_blocked, sig) && > (sig == SIGKILL || !p->ptrace)) { > ... > sigaddset(&t->pending.signal, SIGKILL); > > static inline int __fatal_signal_pending(struct task_struct *p) > { > return unlikely(sigismember(&p->pending.signal, SIGKILL)); > } >