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=-4.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 9BB64C433DF for ; Sat, 15 Aug 2020 02:53:31 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 2923320855 for ; Sat, 15 Aug 2020 02:53:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="Bl4GZHv5" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2923320855 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 7D8958D0002; Fri, 14 Aug 2020 22:53:30 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 789558D0001; Fri, 14 Aug 2020 22:53:30 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 677B88D0002; Fri, 14 Aug 2020 22:53:30 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0139.hostedemail.com [216.40.44.139]) by kanga.kvack.org (Postfix) with ESMTP id 4F47A8D0001 for ; Fri, 14 Aug 2020 22:53:30 -0400 (EDT) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 0FD3F181AEF1E for ; Sat, 15 Aug 2020 02:53:30 +0000 (UTC) X-FDA: 77151282180.22.prose32_0b15b3d27002 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin22.hostedemail.com (Postfix) with ESMTP id D69DF18038E60 for ; Sat, 15 Aug 2020 02:53:29 +0000 (UTC) X-HE-Tag: prose32_0b15b3d27002 X-Filterd-Recvd-Size: 5142 Received: from mail-lj1-f196.google.com (mail-lj1-f196.google.com [209.85.208.196]) by imf14.hostedemail.com (Postfix) with ESMTP for ; Sat, 15 Aug 2020 02:53:29 +0000 (UTC) Received: by mail-lj1-f196.google.com with SMTP id v12so11892015ljc.10 for ; Fri, 14 Aug 2020 19:53:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Sx+s5TgPBhAC17+Um+mU5R2EXL5eDMwOMqanLnBdz2Y=; b=Bl4GZHv5asknFsbNW29RzFsagBbKlsnuqR6i/rfTX0oEs249lVtvS6L/EePn0pxSei 3UJYZbv30ITzXK8T8HGHGmdZ5AK1TOdV19vEc5LsACvxszVZWIUH4yUZqHJPSSen5NyS iIGbjiHf0hWZImak0nld06ODJyIz4oK5b0ExQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Sx+s5TgPBhAC17+Um+mU5R2EXL5eDMwOMqanLnBdz2Y=; b=RthNSQ/uodpgn3Dl0IJdLR8+Vl0NkKMF0rro2kHTIFhz38usbTwrb/cqa1lZpvxm5j frN+ClyPMOOhSC52agj0sbLP4pQAkTmjLhlBm1geU5dhcYGOwev9TfBg1IgEvr32ZQqV x+0QFSsWRVweyDO34wpeJdsI/fVeuiM60wVa+LtQp+qJBvrQJVELTjUYmQn5VjIaYpGf hfU7+wo32gJND9HEBrNJhsFMpkispQpi/As+tCnQ3nXsaVXzkcGZyfCT4LVYw7I/tK0C APTU3KccWj0DC6i1mvJsrov1brqTC01+Tb4GkkGmzAY6MX8RbRhQTqS8mk0q+aCLD/SG ajuw== X-Gm-Message-State: AOAM532eJhf7hp1UcWoNTRy0WI8M5XPFHNto6vdQrpGfC14YxBhrKgLZ PDlV4oiXpT4MhWrUghnd1u4uGEVi4t8SfA== X-Google-Smtp-Source: ABdhPJzhHxHfqIk8+Cf8r11i4S3YPcKQfck64ZpME23M4TbJrzcoZZzO74afLOu6h879JeRTeBVzMw== X-Received: by 2002:a2e:9b95:: with SMTP id z21mr2613238lji.83.1597460007376; Fri, 14 Aug 2020 19:53:27 -0700 (PDT) Received: from mail-lf1-f51.google.com (mail-lf1-f51.google.com. [209.85.167.51]) by smtp.gmail.com with ESMTPSA id e69sm2258779lfd.21.2020.08.14.19.53.25 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 14 Aug 2020 19:53:26 -0700 (PDT) Received: by mail-lf1-f51.google.com with SMTP id d2so5783507lfj.1 for ; Fri, 14 Aug 2020 19:53:25 -0700 (PDT) X-Received: by 2002:a05:6512:3b7:: with SMTP id v23mr2531085lfp.10.1597460005575; Fri, 14 Aug 2020 19:53:25 -0700 (PDT) MIME-Version: 1.0 References: <20200814172939.55d6d80b6e21e4241f1ee1f3@linux-foundation.org> <20200815003102.dzZiwVm-K%akpm@linux-foundation.org> In-Reply-To: <20200815003102.dzZiwVm-K%akpm@linux-foundation.org> From: Linus Torvalds Date: Fri, 14 Aug 2020 19:53:09 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [patch 18/39] mm/madvise: check fatal signal pending of target process To: Andrew Morton Cc: Alexander Duyck , Jens Axboe , Brian Geffon , Christian Brauner , Christian Brauner , Daniel Colascione , Johannes Weiner , Jann Horn , John Dias , Joel Fernandes , Kirill Tkhai , linux-man , Linux-MM , Michal Hocko , Minchan Kim , mm-commits@vger.kernel.org, Oleksandr Natalenko , David Rientjes , Shakeel Butt , sj38.park@gmail.com, sjpark@amazon.de, Sonny Rao , Sandeep Patil , Suren Baghdasaryan , Tim Murray , Vlastimil Babka Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: D69DF18038E60 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam03 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri, Aug 14, 2020 at 5:31 PM Andrew Morton wrote: > > From: Minchan Kim > Subject: mm/madvise: check fatal signal pending of target process > > Bail out to prevent unnecessary CPU overhead if target process has pending > fatal signal during (MADV_COLD|MADV_PAGEOUT) operation. This seems bogus. Returning -EINTR when *SOMEBODY ELSE* has a signal is crazy talk. It also seems to be the reason for the previous patches inexplicably passing in the task pointer. Finally, it has absolutely no explanations for why this would matter, and why it's magically and suddenly an issue for process_madvise(), when in the history of the *real* madvise() this hasn't been an issue for "current". I'm dropping the madvise() series. If the issue is that you can generate a long series or areas with that iovec, maybe the code should re-consider. Or maybe the signal pending case should be done there, not passing down an odd task pointer to the low-level madvise code. Linus