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 2E0A6C433F5 for ; Fri, 13 May 2022 02:41:46 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A26AE6B0075; Thu, 12 May 2022 22:41:45 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9D4618D0002; Thu, 12 May 2022 22:41:45 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 877248D0001; Thu, 12 May 2022 22:41:45 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 777576B0075 for ; Thu, 12 May 2022 22:41:45 -0400 (EDT) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 51DE3327C5 for ; Fri, 13 May 2022 02:41:45 +0000 (UTC) X-FDA: 79459169370.06.EE1C5CF Received: from mail-qv1-f54.google.com (mail-qv1-f54.google.com [209.85.219.54]) by imf25.hostedemail.com (Postfix) with ESMTP id 8BC60A00A9 for ; Fri, 13 May 2022 02:41:25 +0000 (UTC) Received: by mail-qv1-f54.google.com with SMTP id l1so5805330qvh.1 for ; Thu, 12 May 2022 19:41:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toxicpanda-com.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=2+U+SYaW6vkJ0XEvl7xtVWT76tib5ZDaUxF5KKEMX1A=; b=b38pAQO7q4b/T+t0KX9gi5GYnGqPjgdZk/ByhWrR7n3NEYyGcnK/RKSsH630bgczkf T4Nv7371iKGW503YdYPgL0cQoLvmDh2dQsr5fd5JoZIu67kqUCK4hsJxtVbX5+ZJ8UZv uPY2z9ypI1INzyL/ao5ylq4bWpUKGm+kh+oO7pEl5ux878mpAIe6yTJF8fQPH9ZYZ4TK owOxZZQin180JGImwtuSkApIvAfKyUlp/XkYrU5BIlYz9vDg0nWqHzesTKQmgyHDf5iP 25twzdMZXkRQI1ZcEZw/QTK4Pl4wdlXgPKAnYaSGOFWpa0b+XUPdtdUYV/xs5BkBacYj 27ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=2+U+SYaW6vkJ0XEvl7xtVWT76tib5ZDaUxF5KKEMX1A=; b=G+OYOq3RoOUUuCQLtrkIfL3sSvkRHGULz543PFk94LgimDnFXEOTMTkJ9Ys3tHX6/T j/e1/xnGNzgvGdPB/aDXCxCME8qHEL5C0bptCz5CgGstoqDgnxs3FER+7GXrl70sTAlP yTtl0Li6uBjzIL9noTJlfUBPykU9+KujceAdr0+wcVWecJAafdhFIPNhsAuLL3Y0THPN NG5giJSeeCVpJ6C3JziAs+BFt6vk2mGCMXgQVAf0xcxcn58s4ZJgN0JmiCDtCUsaqQ5b +dBTg3aAeMqLQzrPo0PlThsDX2h88YR2+4gbDkFiGPBt0oBQtvmei2Y/aaXOHfJT92Eb FvvA== X-Gm-Message-State: AOAM530O6/GU/oYcAS5mUlIKOZevuCFUqZIvTnPDIfHSyWwKYxR7230u aHuAoxmkGy7yiHMcIWxTxssFrg== X-Google-Smtp-Source: ABdhPJz4DpL0sp0F5yRBm7R8pnTfP+6nn+BoqxYeAPswwQn2OnIGOsyJHGsjHSNt3NpEb5378qzhkQ== X-Received: by 2002:a05:6214:2503:b0:45a:a294:510e with SMTP id gf3-20020a056214250300b0045aa294510emr2764179qvb.49.1652409703962; Thu, 12 May 2022 19:41:43 -0700 (PDT) Received: from localhost (cpe-174-109-172-136.nc.res.rr.com. [174.109.172.136]) by smtp.gmail.com with ESMTPSA id 2-20020ac82082000000b002f39b99f672sm834488qtd.12.2022.05.12.19.41.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 May 2022 19:41:43 -0700 (PDT) Date: Thu, 12 May 2022 22:41:41 -0400 From: Josef Bacik To: Matthew Wilcox Cc: linux-fsdevel@vger.kernel.org, linux-mm@kvack.org Subject: Re: Freeing page flags Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 8BC60A00A9 X-Stat-Signature: ngjow1cqrkzwgjhysjsp41wsga6775q6 Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=toxicpanda-com.20210112.gappssmtp.com header.s=20210112 header.b=b38pAQO7; dmarc=none; spf=none (imf25.hostedemail.com: domain of josef@toxicpanda.com has no SPF policy when checking 209.85.219.54) smtp.mailfrom=josef@toxicpanda.com X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1652409685-855696 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000001, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, May 12, 2022 at 09:54:59PM +0100, Matthew Wilcox wrote: > The LWN writeup [1] on merging the MGLRU reminded me that I need to send > out a plan for removing page flags that we can do without. > > 1. PG_error. It's basically useless. If the page was read successfully, > PG_uptodate is set. If not, PG_uptodate is clear. The page cache > doesn't use PG_error. Some filesystems do, and we need to transition > them away from using it. > What about writes? A cursory look shows we don't clear Uptodate if we fail to write, which is correct I think. The only way to indicate we had a write error to check later is the page error. > 2. PG_private. This tells us whether we have anything stored at > page->private. We can just check if page->private is NULL or not. > No need to have this extra bit. Again, there may be some filesystems > that are a bit wonky here, but I'm sure they're fixable. > At least for Btrfs we serialize the page->private with the private_lock, so we could probably just drop PG_private, but it's kind of nice to check first before we have to take the spin lock. I suppose we can just do if (page->private) // do lock and check thingy Thanks, Josef