Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2784784rwd; Fri, 26 May 2023 11:08:02 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6yc/T9gobi2UOy4xWRPb9ja8+OKCoeZ06gwgveA0EBeYmiG4BHjo9SPWnF5uqdW6xk9RC/ X-Received: by 2002:a05:6a20:158e:b0:10f:8798:9ff3 with SMTP id h14-20020a056a20158e00b0010f87989ff3mr255417pzj.8.1685124482177; Fri, 26 May 2023 11:08:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685124482; cv=none; d=google.com; s=arc-20160816; b=YtO9G8KSUHBRMIkXRpea6dyVOfcDkmViimKoxfovGeAxymmFt4HPIYSZ01iFK+Zmau mwSoCHBIipHqELat2wrw0qYAxDWx6NfJ44yFugYoTv0Xr6K/LJATYWzLNiM8SpLiNU7B olxZ3Uk3211rKVpK6NfM7C5wzKTy3trjUhO3Z4hhSuXBKWSI4sL80XVJhVAiDROw8eyW spZUIOjBW4xuhubEMNUSoO5lA8Fy+He9/SY/hT/214LuwT6fstxZJz0PDlLSx2bQCh3R JG5kBlznqAXJTU55tUPVPo/IGg10sBi6+0Q10ZvMR4Z8fxkyO0y/Cz/7stJ+gYCZLs5L Y8yw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=IlhXisbqRI4JCa1p0EpJL3g9WoXpQt0xT0Nj4ndM20E=; b=JJQLUUMkViMX1jyz89Qdbb26TR9KyB/3q6X4mqxxbHZwUdcvY2qR8no9q8VIgL3IaT drwa6Y6PaWgNxa54e5VCQvLBYj6UYZKSk4PMq1B+d1gVGF4052mD/un6of4nnSoTPIo2 nWaa/hakdV2eTJX+vMdPO7u+PwBthzsGVIp1S+QD4FwTjwo8OR2L+/D2xpkIvGTlJoLN bcshn+CE+JNf0Z6likRqaycJYY/wVMSxbLDwWfl19DazHIoqCbyGY1yIVq9JBQgTyYZD 1Jk9GH3UaBIiqcfGMgCOlLuITc0otpp1EC2pYq0E9xnBrM/uUJ/H3JxEKwKM15QPO4Nm 96Lw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=mnWv9xxp; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f30-20020a63381e000000b005344b60f7ddsi4211771pga.117.2023.05.26.11.07.47; Fri, 26 May 2023 11:08:02 -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=bombadil.20210309 header.b=mnWv9xxp; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242730AbjEZRlc (ORCPT + 99 others); Fri, 26 May 2023 13:41:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50650 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242689AbjEZRl2 (ORCPT ); Fri, 26 May 2023 13:41:28 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8F0CAE5C; Fri, 26 May 2023 10:41:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=IlhXisbqRI4JCa1p0EpJL3g9WoXpQt0xT0Nj4ndM20E=; b=mnWv9xxpTNuhG9+/dZEP0422ih ZPvYZFFcScZsfnA2f4wknjp8Fp0JtupSp2LqseWHGM7ee9+lvA+QH1ioyjPQBJPaRm09DAuRuIwZv eMymAmHrmXat4ByJhquy0fed6ttcWGo5OSwCD4DS0hOTJZVIw3e/jKAfZPk/Dyoj6Bc7pa3JwUyTm U4mdVm/BmYresJJJ/2b5LrnxT1pJH71T53E4VxJMDnaNm+3584FVJJ9t93+Mkg4BRTKHwwm3KUvzM CVPnRwfPFh9kSVefDR9cPVvUJy8aevpvmdUAx0lYoGi0npASsDLKiy7j4Zyju9aD90/HrStecaqc4 MyH9ayMg==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1q2bQy-003KpZ-2Y; Fri, 26 May 2023 17:41:00 +0000 Date: Fri, 26 May 2023 10:41:00 -0700 From: Luis Chamberlain To: Matthew Wilcox Cc: hughd@google.com, akpm@linux-foundation.org, brauner@kernel.org, djwong@kernel.org, p.raghav@samsung.com, da.gomez@samsung.com, rohan.puri@samsung.com, rpuri.linux@gmail.com, a.manzanares@samsung.com, dave@stgolabs.net, yosryahmed@google.com, keescook@chromium.org, hare@suse.de, kbusch@kernel.org, patches@lists.linux.dev, linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [RFC v2 2/8] shmem: convert to use is_folio_hwpoison() Message-ID: References: <20230526075552.363524-1-mcgrof@kernel.org> <20230526075552.363524-3-mcgrof@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Luis Chamberlain X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED 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 Fri, May 26, 2023 at 03:32:54PM +0100, Matthew Wilcox wrote: > On Fri, May 26, 2023 at 12:55:46AM -0700, Luis Chamberlain wrote: > > The PageHWPoison() call can be converted over to the respective folio > > call is_folio_hwpoison(). This introduces no functional changes. > > Yes, it very much does! > > > @@ -4548,7 +4548,7 @@ struct page *shmem_read_mapping_page_gfp(struct address_space *mapping, > > return &folio->page; > > > > page = folio_file_page(folio, index); > > - if (PageHWPoison(page)) { > > + if (is_folio_hwpoison(folio)) { > > folio_put(folio); > > Imagine you have an order-9 folio and one of the pages in it gets > HWPoison. Before, you can read the other 511 pages in the folio. But before we didn't use high order folios for reads on tmpfs? But I get the idea. > After your patch, you can't read any of them. You've effectively > increased the blast radius of any hwerror, and I don't think that's an > acceptable change. I see, thanks! Will fix if we move forward with this. Luis