Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp1835526imw; Tue, 5 Jul 2022 16:43:21 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sA9BIFQb9ycT/G4pnZ3yLjbfcudAix2X0PiikkwBVwqWKdu8BY9aCSaRopE9cXfmbAEVlU X-Received: by 2002:a17:903:32c4:b0:16a:4201:45e4 with SMTP id i4-20020a17090332c400b0016a420145e4mr44063618plr.108.1657064600888; Tue, 05 Jul 2022 16:43:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657064600; cv=none; d=google.com; s=arc-20160816; b=POCpSH82Q4+wZwKOJxNvK+HAoUJ7EluR5wVcXtSgyHJArroIKcCp0WshGwiQbEq+1t ZEWX9KefHljE2tpr/jQkdgeiv22V9OHUM8P//a7bgzHLacXBxiOjE31ssAfnifpWA7/8 OqmxC6vT5sazHaNCkI4N67OGYUD9EZ9rFT5kCL0ixdHQ+7xCKW29NcTJ0z65qSbudtsT yRLF/buUUZ00qY5h4U6J0bKEk6dSC8NBnq/9dYzFXG1Fgp4LlfZPLtRJ9DvfxwIUGf2P a86hIJECyZraHnp+SVqyvaiWhnuNhEJzbsTOUoHYvdPvDTHwZLyBBevciR/aUIR2rxwK pNbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=7dOROrO9ycYqqFp5LnucNCHf+IZBjlMW0xOCXAdstaI=; b=DK+BuHuwccz9buEHB8Rk1y+zDtL/kxl+Ibh303eR9vAZyD+0xhOHV31tCMh1jh58zb p3yi2ryiTVxOxOf3qxWGqdDabrmYwLXsfdn3Pph+TVo6GzfsS5aW5094+7M50jw5IDo2 uyEKHUdUsib4W1BWdEe/YTIwvJyaWUy4jGOx0MPsAsm0nM6RCO7v7/JsY7tV+RslN2PE FObkeAvMTVq3nKr7bUalKBdm2hMG6o18xTa4ekYD1DuK11YaP9HK5RDq25O++elifBas DhIneDqblc3YuZ22cuZ4hR4i2q+ebB7cyxQH3qnwtB+A03HpjT3k8yuo4m8H3v6rFXvf dReQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="SH/FIVKv"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k21-20020aa788d5000000b0052572000132si49854688pff.230.2022.07.05.16.43.08; Tue, 05 Jul 2022 16:43:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="SH/FIVKv"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229994AbiGEXjM (ORCPT + 99 others); Tue, 5 Jul 2022 19:39:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44836 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229473AbiGEXjH (ORCPT ); Tue, 5 Jul 2022 19:39:07 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E3A317079; Tue, 5 Jul 2022 16:39:05 -0700 (PDT) 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=7dOROrO9ycYqqFp5LnucNCHf+IZBjlMW0xOCXAdstaI=; b=SH/FIVKv4ze5KjxElB8DD+inAv WdgdA14/H/bwLYy5QM/Kru16CyPUMnpZ+eg35afyOs5VvA4c7xWgYmI8Nx9YO12eNeJqwzH45+qTr dHJcvlOSkhByWy8WIj0WctzuLSc+wZfi2mhShSWc/U6kDWohGRVQfpjj0irNXCCBFxSkoeTtuNfAR sMnsK0WTTuTqdIEOCmlQbyxp8vlUEbcQIjFBTj2Dlz0/ivW7eHjSry8gjEQOw2nKpAPqTRuJ2oJd5 +2a1PjbuHoa08mVoKksM3iFz7LHK/1/kCuK7wIkfMK0Pw7DRhpA/Z/ik0lh87lWBSpoCu6HGi1i0a RJmKoX8g==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1o8s7t-0010o7-IO; Tue, 05 Jul 2022 23:38:41 +0000 Date: Wed, 6 Jul 2022 00:38:41 +0100 From: Matthew Wilcox To: Andrew Morton 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: References: <20220705123532.283-1-songmuchun@bytedance.com> <20220705141819.804eb972d43be3434dc70192@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220705141819.804eb972d43be3434dc70192@linux-foundation.org> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.