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=-2.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FSL_HELO_FAKE,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 A3B08C433E1 for ; Sat, 15 Aug 2020 04:59:07 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 55BD522DBF for ; Sat, 15 Aug 2020 04:59:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Ki7bYhLA" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 55BD522DBF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id CD9D16B000D; Sat, 15 Aug 2020 00:59:06 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C8AA46B000E; Sat, 15 Aug 2020 00:59:06 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B523C6B0010; Sat, 15 Aug 2020 00:59:06 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0119.hostedemail.com [216.40.44.119]) by kanga.kvack.org (Postfix) with ESMTP id 9C8026B000D for ; Sat, 15 Aug 2020 00:59:06 -0400 (EDT) Received: from smtpin12.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 525B14DBF for ; Sat, 15 Aug 2020 04:59:06 +0000 (UTC) X-FDA: 77151598692.12.pear63_450993b27002 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin12.hostedemail.com (Postfix) with ESMTP id 26570180171BD for ; Sat, 15 Aug 2020 04:59:06 +0000 (UTC) X-HE-Tag: pear63_450993b27002 X-Filterd-Recvd-Size: 5579 Received: from mail-pj1-f65.google.com (mail-pj1-f65.google.com [209.85.216.65]) by imf13.hostedemail.com (Postfix) with ESMTP for ; Sat, 15 Aug 2020 04:59:05 +0000 (UTC) Received: by mail-pj1-f65.google.com with SMTP id t6so5289681pjr.0 for ; Fri, 14 Aug 2020 21:59:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=6AOrBOC1WvyrFxHGLfDmzX0lZDL/sVmOmui5rhLJhgI=; b=Ki7bYhLA3EVQxpyn7XxeYbZCnwxb3zyhmQ+/SgoEQV60184OODJ6izkUTagCqCDQiH 87BS+SBKQu6Y3UfIV0TRqsgwFyxWC9I2tR3xhl+ye+OE7+ErkE8kVN7uzT2QDB5xJMMG +briLzuyNjr78Zm0uASYkr3EZzK+14teAAMD4e6+uiwcIH48cnyfUPyWBkfoH7SQF9He zMUr1f+MjjKC65ui9yDs7Zhl2+0AiNcbZfVCnDpI14M8tiS1S4D/tr6x3Jn+8BwOSnlG DMSzga2oRzET3JDUJCrLr0ZZ2hK69jXW+fAgHeSIw615tJ3688un4yjSC8xrGR9XTfdS 01gA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=6AOrBOC1WvyrFxHGLfDmzX0lZDL/sVmOmui5rhLJhgI=; b=B/IN3xuQbmG4s0/9dRMP7Ayhcx7PRO51BAFEW8cT0a95W+/1zO1kTUBrx+4RSH1L4I kiNVpodtnzc1dQ5VbZW9FSZcDk2TmPSeDQMKZccfU+hfaBG5NOpArFWL/W4zf0MasB5C d/AFjZW1k9DwDNMK1VfJz5qwOYVnItHeR2HlUif5K+ZXVH/Nh6962Ed/JqEj2z3UzyzD XSGpivFy7P9GN00jNVMaWLLt03ck0t5fEHimO5U7W1NA+nNRtI1LYq2ywe2NGur57mhp ZO72XMe3a4TcYr54rPoh70TGYSs0eov5zkexGiYsfmRKr8TjqQqONPnw5yB3yCUZtqK4 BerA== X-Gm-Message-State: AOAM533spVmTU7VrnaRN0cI9lmIQHRvjPT+QUaI8j67uyxHSPCD2dIPH l+8Aj5xx//45+avgZcbIWUA= X-Google-Smtp-Source: ABdhPJxlftWBCf4a2RWrSk4z2YRnmCdxTLoZTWMTLq8PrDtMi25qbydctRYAz1JTVkR8uhRvCmGa3g== X-Received: by 2002:a17:90b:4b81:: with SMTP id lr1mr1257333pjb.71.1597467544645; Fri, 14 Aug 2020 21:59:04 -0700 (PDT) Received: from google.com ([2620:15c:211:1:7220:84ff:fe09:5e58]) by smtp.gmail.com with ESMTPSA id 2sm9865080pjg.32.2020.08.14.21.59.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Aug 2020 21:59:03 -0700 (PDT) Date: Fri, 14 Aug 2020 21:59:00 -0700 From: Minchan Kim To: Linus Torvalds Cc: Andrew Morton , 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 , 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 Subject: Re: [patch 18/39] mm/madvise: check fatal signal pending of target process Message-ID: <20200815045900.GA2936603@google.com> References: <20200814172939.55d6d80b6e21e4241f1ee1f3@linux-foundation.org> <20200815003102.dzZiwVm-K%akpm@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 26570180171BD X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam01 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 07:53:09PM -0700, Linus Torvalds wrote: > 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 doesn't propagate -EINTR to the user but just aiming for canceling the entire operation. > > 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". Currently, madvise(MADV_COLD|PAGEOUT) already have done it. I just wanted to sync with it with process_madvise. Ting was process_madvise couldn't get target task while madvise could get it easily. > > 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. Do you mean you want to drop target signal check madvise as well as process_madvise?