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 Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7EFF1EFCE39 for ; Wed, 4 Mar 2026 19:01:15 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4fR27s3d2dz3c1T; Thu, 05 Mar 2026 06:01:13 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip="2001:8b0:10b:1236::1" ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1772650873; cv=none; b=luC4MI4cxVTS0VRya63fVjsDxpYjqSI0KsXZ+hvVcYdy3fgMpk/+YXxRviQsr1M4dcGW3trDlBXtQv3bhSjgRCPZtsEbV+QDTzssefW68BXo2OCSBxfGOK+LU4WGKWt3r5K4y/oVjHPcxrZfRJablMzuHUQgqFVCHQ2PT0hE6gxGzLKZeIdZCI/IC5hD7j5uOSMs2KGRhKdc035haLT7KZ8IrV8Q8KqImq76NXCeU1DKhI1FrPaH7A1SghicAm6/DwxEFexHv0yXCVOT7BxLS/dirCugGeA5LAw3LpZb8FQl4stLJqDQbMYB6IolBe+B24t71dLVOZddnhH+Ky5V/A== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1772650873; c=relaxed/relaxed; bh=Wh9qbG+FlyiO8UJnUIqCRxZKnSQBC+n2Ht087H8Gkjc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=HPpU+/YgLr9BbeZjqtUCJbwqllJ22e2jUSNUOyi/J7VLxrSOnXw1mbU5bd0mmJVzTvYRCun61uXDKVTOJJo1Lhm4jzMcnJxcpsjXX5DWi8klrTYsv2m+4RqgYZU3O+H/gY4GzyAIGKGHRvu6T1lTV1bYpUcyqCATe4VnlziKwlLvoeA7u3BdNBoU9FiQPF3Zh8T5jUt9czx8CN1g6oGcWd/Q7tXnCqNDDTfr/bfSOSLSqJfI/NJrGhCJMjm51fvWB7gp8eZlJIcGhx5Hm9CCc6u/fbtEIwbV33llIJpceNhTGObURVNEnapjz7dq6mzJejsJPJKkVecoQ2aXgp7rWw== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=infradead.org; dkim=pass (2048-bit key; secure) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256 header.s=casper.20170209 header.b=Ux/svElR; dkim-atps=neutral; spf=none (client-ip=2001:8b0:10b:1236::1; helo=casper.infradead.org; envelope-from=willy@infradead.org; receiver=lists.ozlabs.org) smtp.mailfrom=infradead.org Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=infradead.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256 header.s=casper.20170209 header.b=Ux/svElR; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=infradead.org (client-ip=2001:8b0:10b:1236::1; helo=casper.infradead.org; envelope-from=willy@infradead.org; receiver=lists.ozlabs.org) Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4fR27q2XKcz3c1J for ; Thu, 05 Mar 2026 06:01:09 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=Wh9qbG+FlyiO8UJnUIqCRxZKnSQBC+n2Ht087H8Gkjc=; b=Ux/svElRXHueLOyBqfF1CjH034 pVIaaWu+XZ2IzFCkCimQhpcWBz9HZWxXo3fVhBUVfsKzd83PTHdpBmtxIBz/2mEOeJwJMgHCUTHYY zPBWTxPIV4MAJw9I8nQsZAl2i/EIG2gVB/J7B7ks4SVOi2uD4WQdtxAPSGwNJpKbiEYLofE5P1cNw dG5JNemsOusR9NtxvbnEYiu3NLsng+pstSqqwC//Jq1omGSBxGMvOZNQi1if8OH7Awpt9YFIxf5u8 gl/KAQsccjpTpyVG559RaXJAx58uOAdor3zwhjmi1zoJUGXCJCAxO1aPyYGmZS/S754Y4GFoZ8vQz cSkTSC1A==; Received: from willy by casper.infradead.org with local (Exim 4.98.2 #2 (Red Hat Linux)) id 1vxrSh-0000000Dl6K-15gd; Wed, 04 Mar 2026 19:00:47 +0000 Date: Wed, 4 Mar 2026 19:00:47 +0000 From: Matthew Wilcox To: "Lorenzo Stoakes (Oracle)" Cc: Suren Baghdasaryan , Lorenzo Stoakes , akpm@linux-foundation.org, david@kernel.org, ziy@nvidia.com, matthew.brost@intel.com, joshua.hahnjy@gmail.com, rakie.kim@sk.com, byungchul@sk.com, gourry@gourry.net, ying.huang@linux.alibaba.com, apopple@nvidia.com, baolin.wang@linux.alibaba.com, Liam.Howlett@oracle.com, npache@redhat.com, ryan.roberts@arm.com, dev.jain@arm.com, baohua@kernel.org, lance.yang@linux.dev, vbabka@suse.cz, jannh@google.com, rppt@kernel.org, mhocko@suse.com, pfalcato@suse.de, kees@kernel.org, maddy@linux.ibm.com, npiggin@gmail.com, mpe@ellerman.id.au, chleroy@kernel.org, borntraeger@linux.ibm.com, frankja@linux.ibm.com, imbrenda@linux.ibm.com, hca@linux.ibm.com, gor@linux.ibm.com, agordeev@linux.ibm.com, svens@linux.ibm.com, gerald.schaefer@linux.ibm.com, linux-mm@kvack.org, linuxppc-dev@lists.ozlabs.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org, "Ritesh Harjani (IBM)" Subject: Re: [PATCH v3 2/3] mm: replace vma_start_write() with vma_start_write_killable() Message-ID: References: <20260226070609.3072570-1-surenb@google.com> <20260226070609.3072570-3-surenb@google.com> <74bffc7a-2b8c-40ae-ab02-cd0ced082e18@lucifer.local> <76aff8f9-1c08-449a-a034-f3b93440d1a8@lucifer.local> X-Mailing-List: linuxppc-dev@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <76aff8f9-1c08-449a-a034-f3b93440d1a8@lucifer.local> On Wed, Mar 04, 2026 at 04:53:27PM +0000, Lorenzo Stoakes (Oracle) wrote: > On Wed, Mar 04, 2026 at 03:24:05AM +0000, Matthew Wilcox wrote: > > We could literally return any error code -- it never makes it to > > userspace. I forget where it is, but if you follow the syscall > > return to user path, a dying task never makes it to running a single > > instruction. > > Thanks for that Matthew, that makes life easier then. > > We can probably replace some of the more horrid if (err == -EINTR) stuff with > fatal_signal_pending(current) to be clearer as a result. Umm. Be careful? fatal_signal_pending() may become true at a later point, so you may have acquired the lock _and_ fatal_signal_pending() can be true. I'd need to audit a patch to be sure that it's a reasonable replacement.