Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp638248pxk; Wed, 9 Sep 2020 14:59:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwUDObU5g8h1ZXyjJ2INT2xsLiuo4CHkrFloqg/oChaf20T6tGFJCG8KEj0Rwt7parHBkTi X-Received: by 2002:a17:906:5f8a:: with SMTP id a10mr5614444eju.502.1599688780177; Wed, 09 Sep 2020 14:59:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599688780; cv=none; d=google.com; s=arc-20160816; b=wB3hR7eNgdrEd5pIO3MVC14QlF3xBHIBqZAVNMJKtUh9fluvWMX9C1qPjh0RcokCdU 1VmYmZXkODawOJd+a9q0vZ9JBV0Ij6W1czkMpGYtN4audBzNjynf+5XKL+gW/XIubyG6 aV0GtQFKBI4w+x/fCNV8kAt0Y7bG62Dq6GsrEq8GsGlMUVUKNIPOYKf9D1GZvan+lSTD BMlM1GEvt/ni/IMRkNtZy/CFf29RLJPRVoO7l/kcPekFobT2oZDRA+NyXSH0Hnbi16ol +dBpEbhVN1OEwkBbmYvt8WhqClpSG+HBkMbuwbxJSwO/IIy9FF+osNzUDC+kO7Wc99Uj yF7w== 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=FNykoWm0eKUq3lNLrS/20TUqU1lX96BWDe+AeQ3hX4M=; b=lweGv3mqVjd6lnZMwNENnrtAlv8otq2jWeYgoeU6l7npjc5rw1mC+7CTLkdIVouRsc 178Y3UaI1FRodjLCKMd8Nm1cWHMruKmE7hMW/w5dcAxx4Plk5z4pdoW+MJ8e7XfUeUT1 CfDJUV+lCKxDu0zHST2uXf73Yz9mxzbY5v6n1PiRgoWZ3kY7gCmy7Gz+8/gU+xX3DhnB L9+ickJ6vgwIqJ/Irk7hJbnvW/z1NUPG2Q+ySPuUKXAfsj56wum5MK5KhyrwwqzJbxUt FerUW2dGOci+tDNF3CWHCmoyFYsmWqlf1eFUzcs9hvEg6cVwc7r/pdbrx+F0gRvxYNSs 9Hsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chrisdown.name header.s=google header.b=o7niafP1; 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 b29si2201926ejl.385.2020.09.09.14.59.16; Wed, 09 Sep 2020 14:59:40 -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=o7niafP1; 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 S1726714AbgIIV4X (ORCPT + 99 others); Wed, 9 Sep 2020 17:56:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50882 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726426AbgIIV4U (ORCPT ); Wed, 9 Sep 2020 17:56:20 -0400 Received: from mail-qt1-x844.google.com (mail-qt1-x844.google.com [IPv6:2607:f8b0:4864:20::844]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4BF9EC061573 for ; Wed, 9 Sep 2020 14:56:19 -0700 (PDT) Received: by mail-qt1-x844.google.com with SMTP id k25so3266178qtu.4 for ; Wed, 09 Sep 2020 14:56:19 -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=FNykoWm0eKUq3lNLrS/20TUqU1lX96BWDe+AeQ3hX4M=; b=o7niafP1tG73NDS6Rak5c4MU8M6FuPVOxUkR2TgX6qIQZIo3PV1ANkqmjY4edFvaOu AVuGmflvLPrQXIpQY8Xs5atmd6KxCQvkHrBZEQpFPr0PZy50PkhgXGh6cBogYqgTIwfI LzbvJlocqjOcF4mUju0RgmYUBzE+MaArTTMgY= 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=FNykoWm0eKUq3lNLrS/20TUqU1lX96BWDe+AeQ3hX4M=; b=mVd3//0xG72Ll2W90gG55M6uvROsn/T3VkKuJuOsB+8QlHVp5q8cHYZB2Zl0bDxjuc X6USA3NGsszOS1P9GIdIMvn2GRDwuixN64G/kLEW4xsE/GTj5rnW091QVUpjG/TABw/K CXK2Ya1hcJyWZbtt/827HUwjS/l4SljtoHeKuHLn/KabPLMJjutFZuRpYxJ14K0GKUFy sLYN7NzUwMEWbLyziRkZBHNCOZEBKLSe5Lx47dRCNloHvgjRvp4Uv2kHxtL42shGKu94 exM+dMf8EXGPpl/BfGfZbA0subj0MsPqfov/x6MUQ/j3eJyv6ECBrXs87LxyT6vxdQfx cgbA== X-Gm-Message-State: AOAM532F/QDi/UsUZQvcGEZKLKz0g/tn7PyCz7L2WHbE/eTdILxeTAT0 rHvttlXHguFiZMmJuBx97wGjfj/hHJOm3/ke X-Received: by 2002:ac8:4e09:: with SMTP id c9mr3724070qtw.347.1599688578484; Wed, 09 Sep 2020 14:56:18 -0700 (PDT) Received: from localhost ([2620:10d:c091:480::1:16fd]) by smtp.gmail.com with ESMTPSA id x49sm4625877qtc.94.2020.09.09.14.56.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 14:56:17 -0700 (PDT) Date: Wed, 9 Sep 2020 22:56:16 +0100 From: Chris Down To: Matthew Wilcox Cc: Vlastimil Babka , 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: <20200909215616.GA1609213@chrisdown.name> References: <20200909152047.27905-1-zangchunxin@bytedance.com> <16906d44-9e3c-76a1-f1a9-ced61e865467@suse.cz> <20200909214724.GA1577471@chrisdown.name> <20200909215209.GP6583@casper.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20200909215209.GP6583@casper.infradead.org> 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 Matthew Wilcox writes: >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. > > 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)); >} Oh great, that makes things way easier. Thanks!