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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 239F6C433EF for ; Tue, 5 Jul 2022 23:47:14 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9EC2A8E0002; Tue, 5 Jul 2022 19:47:13 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 999E18E0001; Tue, 5 Jul 2022 19:47:13 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 888088E0002; Tue, 5 Jul 2022 19:47:13 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 7B2008E0001 for ; Tue, 5 Jul 2022 19:47:13 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 517BF212EE for ; Tue, 5 Jul 2022 23:47:13 +0000 (UTC) X-FDA: 79654684746.12.86F42B2 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf05.hostedemail.com (Postfix) with ESMTP id DF075100009 for ; Tue, 5 Jul 2022 23:47:12 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E6007608C1; Tue, 5 Jul 2022 23:47:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E5B8FC341C7; Tue, 5 Jul 2022 23:47:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1657064831; bh=o6+uEa9oFMJ7TN5lXZ6eXHFu61N/m+3PxNR6KYPiNjE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=LZ/XSNiZGUPpls3tn7LlFReeWR1H6ceEEvgQSuy86ficsGImVGGVEI+MkKLLglhhH nwn8TLb/sX5SO0/xSuEO92hxS4WR5/BAouAEazVQbnCxEknxgH8FvhIT2MKkpf66Wm Gcm3/1Cxc80ZOtNSpTESgImvRkRsj9G7hacIWj08= Date: Tue, 5 Jul 2022 16:47:10 -0700 From: Andrew Morton To: Matthew Wilcox Cc: Muchun Song , jgg@ziepe.ca, jhubbard@nvidia.com, william.kucharski@oracle.com, dan.j.williams@intel.com, jack@suse.cz, linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, nvdimm@lists.linux.dev, stable@vger.kernel.org Subject: Re: [PATCH v2] mm: fix missing wake-up event for FSDAX pages Message-Id: <20220705164710.9541b5cf0e5819193213ea5c@linux-foundation.org> In-Reply-To: References: <20220705123532.283-1-songmuchun@bytedance.com> <20220705141819.804eb972d43be3434dc70192@linux-foundation.org> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1657064833; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=EwS9m4pJARZ6Uwu+G7R1v7eHTbSvm35Xcnt2vhOcsXo=; b=vo9k1QhlyhONMezYCkYRhD5b3iwaSerLTk6GUOmXpPXnSIeYDHVu6z+KJQEGimVUYnyTbl Fo7tSYC1R0h36NpzZVEFkqm9QCuXjKr2nJhlBkZ0weOhZiz9Kc9hibuBH/71qndki8EA0M jIn0OEfox8E1UdDIJAFu2FveuAifoyo= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1657064833; a=rsa-sha256; cv=none; b=VEL3ERi6lELOpGL6/s1SU6YvXkXwltmEJ6zBXoHAmqzq8da0I0JzPdwdXwf6wCeSkFoT3t TJvg52znwxn/MtD4AqamJ7qYg9MT/lyKIQzQxGMCE9oxqC1i5//PtLaenFLEHxaWHjm1eS ctUNNloQdrldLPY7pDSkSHqhCK1XhIk= ARC-Authentication-Results: i=1; imf05.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b="LZ/XSNiZ"; dmarc=none; spf=pass (imf05.hostedemail.com: domain of akpm@linux-foundation.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org X-Stat-Signature: f9gqxdg7hbw5au4qr634rjh5askydnkj X-Rspamd-Queue-Id: DF075100009 X-Rspam-User: Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b="LZ/XSNiZ"; dmarc=none; spf=pass (imf05.hostedemail.com: domain of akpm@linux-foundation.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org X-Rspamd-Server: rspam10 X-HE-Tag: 1657064832-823201 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 Wed, 6 Jul 2022 00:38:41 +0100 Matthew Wilcox wrote: > On Tue, Jul 05, 2022 at 02:18:19PM -0700, Andrew Morton wrote: > > On Tue, 5 Jul 2022 20:35:32 +0800 Muchun Song wrote: > > > > > FSDAX page refcounts are 1-based, rather than 0-based: if refcount is > > > 1, then the page is freed. The FSDAX pages can be pinned through GUP, > > > then they will be unpinned via unpin_user_page() using a folio variant > > > to put the page, however, folio variants did not consider this special > > > case, the result will be to miss a wakeup event (like the user of > > > __fuse_dax_break_layouts()). Since FSDAX pages are only possible get > > > by GUP users, so fix GUP instead of folio_put() to lower overhead. > > > > > > > What are the user visible runtime effects of this bug? > > "missing wake up event" seems pretty obvious to me? Something goes to > sleep waiting for a page to become unused, and is never woken. No, missed wakeups are often obscured by another wakeup coming in shortly afterwards. If this wakeup is not one of these, then are there reports from the softlockup detector? Do we have reports of processes permanently stuck in D state?