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.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 54A11C47E48 for ; Thu, 26 Sep 2019 08:59:01 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 23383222C3 for ; Thu, 26 Sep 2019 08:59:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 23383222C3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id B67656B000A; Thu, 26 Sep 2019 04:59:00 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id AF0896B000C; Thu, 26 Sep 2019 04:59:00 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9B76B6B000D; Thu, 26 Sep 2019 04:59:00 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0050.hostedemail.com [216.40.44.50]) by kanga.kvack.org (Postfix) with ESMTP id 73D3A6B000A for ; Thu, 26 Sep 2019 04:59:00 -0400 (EDT) Received: from smtpin03.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with SMTP id 1E4F4248B6 for ; Thu, 26 Sep 2019 08:59:00 +0000 (UTC) X-FDA: 75976472040.03.wool48_3171403948706 X-HE-Tag: wool48_3171403948706 X-Filterd-Recvd-Size: 4549 Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by imf37.hostedemail.com (Postfix) with ESMTP for ; Thu, 26 Sep 2019 08:58:59 +0000 (UTC) Received: from mail-pf1-f200.google.com (mail-pf1-f200.google.com [209.85.210.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9C6585AFE3 for ; Thu, 26 Sep 2019 08:58:58 +0000 (UTC) Received: by mail-pf1-f200.google.com with SMTP id z4so1307705pfn.0 for ; Thu, 26 Sep 2019 01:58:58 -0700 (PDT) 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=L9VfLVOKM8R9jc1z9s5TsnK21zyB5Qwdz7pgoArH7ZU=; b=POogjYpPnmVv5sPCG8jA6MayVS+58FUhvj0Ec/qbbVGqdaPSilYcq7fpPhZJs7/zR5 +uZfDBl00ireIK0eLX596UxaDHVcHroGVd+toFu8d1z3rAHAwk718vnPZTdO7Rh0KpdI hH1zAMq0bu4hw8gj/NAfOdllI4uxhqM/W3cdz6c4iP9rFslVJSN0dVmkqKpQhEvGDmRH 0Y4dzed/HP1xud7wi8g6BSxAmKYSNxxjsX1pPv1Sp7u+ObkDt2n0UMdoyDRE6jtrVvl4 zQ9e4UpZfQhH7cf3QdwBo22gVHRNs0SYeM0LBJGK6HB7McYNRMYLeBWG0TWP4grxE6ZS z36Q== X-Gm-Message-State: APjAAAX26mALtg2Xd4sJwuFN4DzXO0UzCMIEy3Fgu86UILGamATcFdbT yowVOfjfXgK+tJJigWRuaQvUxc9F9KZpljmBuWCkzzbuI9B33bHVoUfokxqmLdube0B5wYmY9GB UV28rreFe8/w= X-Received: by 2002:a17:90a:1090:: with SMTP id c16mr2409840pja.132.1569488338077; Thu, 26 Sep 2019 01:58:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqzhaZZThluUL2F/LQPkfZtnZIdTa4Wg7MLC8P+1p0q6ib/uQgwy0h20Y+B1DooAZuLsy2ZgwA== X-Received: by 2002:a17:90a:1090:: with SMTP id c16mr2409814pja.132.1569488337664; Thu, 26 Sep 2019 01:58:57 -0700 (PDT) Received: from xz-x1 ([114.250.102.230]) by smtp.gmail.com with ESMTPSA id b24sm1341257pgs.15.2019.09.26.01.58.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Sep 2019 01:58:56 -0700 (PDT) Date: Thu, 26 Sep 2019 16:58:49 +0800 From: Peter Xu To: Matthew Wilcox Cc: Linus Torvalds , Linux-MM , Linux Kernel Mailing List , David Hildenbrand , Hugh Dickins , Maya Gokhale , Jerome Glisse , Pavel Emelyanov , Johannes Weiner , Martin Cracauer , Marty McFadden , Shaohua Li , Andrea Arcangeli , Mike Kravetz , Denis Plotnikov , Mike Rapoport , Mel Gorman , "Kirill A . Shutemov" , "Dr . David Alan Gilbert" Subject: Re: [PATCH v4 05/10] mm: Return faster for non-fatal signals in user mode faults Message-ID: <20190926085849.GA3077@xz-x1> References: <20190923042523.10027-1-peterx@redhat.com> <20190923042523.10027-6-peterx@redhat.com> <20190924024721.GD28074@xz-x1> <20190924025447.GE1855@bombadil.infradead.org> <20190924031908.GF28074@xz-x1> <20190924154518.GG1855@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20190924154518.GG1855@bombadil.infradead.org> User-Agent: Mutt/1.11.4 (2019-03-13) 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 Tue, Sep 24, 2019 at 08:45:18AM -0700, Matthew Wilcox wrote: [...] > Oh, and while you're looking at the callers of handle_mm_fault(), a > lot of them don't check conditions in the right order. x86, at least, > handles FAULT_RETRY before handling FAULT_ERROR, which is clearly wrong. > > Kirill and I recently discussed it here: > https://lore.kernel.org/linux-mm/20190911152338.gqqgxrmqycodfocb@box/T/ Is there any existing path in master that we can get VM_FAULT_RETRY returned with any existing VM_FAULT_ERROR bit? It seems to me that above link is the first one that is going to introduce such case? If so, I'm uncertain now on whether I should have one patch to handle the ERROR case first as you suggested with this series, because otherwise that patch won't explain itself without a real benefit... Thanks, -- Peter Xu