Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp1870338ybn; Thu, 26 Sep 2019 03:30:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqzz6wkbCO6oVOEMF/fOSl6Xaj97aaoQcI98uAi6RDRPM3b3SyHLo6ygm4NvVDgM4Eq+vyvh X-Received: by 2002:a17:906:48e:: with SMTP id f14mr2330706eja.15.1569493853614; Thu, 26 Sep 2019 03:30:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569493853; cv=none; d=google.com; s=arc-20160816; b=VdPF+U1B697pMWprSaWE8YUSJ/aE/5XTCi+6FxS1u0AB105rMyuF2t7wi3i5614SmY 8SD6VV9cd/v71qNBSk6CB7aTkxexEjAHjwAahV0yOLJDJ1wHZy/kgVv+nOAlnbbXpgGD eg/gowyM/ifVRcmSKjyMUEjRKV/EjLotV5JWVPBxvfObXW+vsF8VZi/INOstSCVLxmH7 mLoZ12Kni1QurAWsLBPJv+2qBiz6Cx0NL9gzw9KSgNZyyiUCfCLod9GxV8Jjuqqh3NLg 1J/XMnwiBe8txl7jYV9K2g3uEU98vCW6fd8ORgMyN+abyO8uaw1i0oIy6qKX/Be2anPt A3oQ== 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; bh=L9VfLVOKM8R9jc1z9s5TsnK21zyB5Qwdz7pgoArH7ZU=; b=K3LvHaliFW/nU4fIPgjLqRHpR2tjptogdjAdaIGvQq7XNvkSPKQYjGTdTZCg8rWIN2 XRqiCmfIRz9NV0s7cHZVRfEjHMwc1z0E6P2O10pK6O4x8wlEVg5j+SQYsQFWnBXyjO2P O8rgKny3teHxJBQeGYZp9oH0Bx3empZsqEqED9sCsVEZCGPZZO708zgu1YygZHDoh8HR k0lYbZYR6ckmyCViYak6K3r0lDAi52P8EglW/Oob98cP05stzRKx8S5trmeUZe7w+rV7 nW1QFvU9uWATmldklHLKu/KWHflfe+ywRfU0Ye9TZP7HBs9SwQOz6D9mmx8eOr4+ZkFK eOhQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e25si1051697edb.308.2019.09.26.03.30.30; Thu, 26 Sep 2019 03:30:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729851AbfIZI67 (ORCPT + 99 others); Thu, 26 Sep 2019 04:58:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55076 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729060AbfIZI66 (ORCPT ); Thu, 26 Sep 2019 04:58:58 -0400 Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.198]) (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 9ED665859E for ; Thu, 26 Sep 2019 08:58:58 +0000 (UTC) Received: by mail-pf1-f198.google.com with SMTP id z13so1281298pfr.15 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=FRw1iMBhwxI9rXPjyC0mckE0jlJIUdjPrjhKe8yBg1kXYTEUwfibaHMUmjgVFYIxiW 5iiXnHUg7imxbaL0RIDXjs8js5Dg8LRtWdCB6MSyViz18Iqh6t9bEqY2FofSlov3QeKi 67YyjWsLb5sZ+ChfZ62WVYaDcIuf11n8HxByHk9xf1y27Wr5k5nGi0t8/XR8U2G5rfmY 2fjJzi+NMitaDUPtz2TGNtqz9uJikODpToBmMNH3UDy+BSefukIFsB3I32qKQ6Ibi4u2 g4AOduUHWe1mZKmsts3GLfWD4BOErhPJ6XuDxVJyq/xBgFtzGsaDWDt6o/IG4B4C+9GG 4Jaw== X-Gm-Message-State: APjAAAU3iK/T/7IcKA5eSUB5ZPW+GwL+3FwSNLfEI8ImCT06ehIijEAB 5a7EGQxHm4bWgXZIijGQSKA913zCIzgZdNt7a46V2xcPKQ/SEXUtAOoDLcLEfm/IWCkY3VfvZGm MoG3avvgfAqrV8nvmYi7tu5hj X-Received: by 2002:a17:90a:1090:: with SMTP id c16mr2409837pja.132.1569488338077; Thu, 26 Sep 2019 01:58:58 -0700 (PDT) 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) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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