public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Wei Yang <richard.weiyang@gmail.com>
To: Vlastimil Babka <vbabka@suse.cz>
Cc: Wei Yang <richard.weiyang@gmail.com>,
	Matthew Wilcox <willy@infradead.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	peterz@infradead.org, will@kernel.org, linyunsheng@huawei.com,
	aarcange@redhat.com, feng.tang@intel.com, ebiederm@xmission.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm: remove offset check on page->compound_head and folio->lru
Date: Sat, 29 Jan 2022 00:47:39 +0000	[thread overview]
Message-ID: <20220129004739.d2b3dqiv3qw6dfhs@master> (raw)
In-Reply-To: <9451a3f7-ef63-6d01-1357-4953f3d1e566@suse.cz>

On Thu, Jan 27, 2022 at 04:42:10PM +0100, Vlastimil Babka wrote:
>On 1/27/22 02:10, Wei Yang wrote:
>> On Tue, Jan 25, 2022 at 11:11:40AM +0100, Vlastimil Babka wrote:
>>>On 1/24/22 23:55, Wei Yang wrote:
>>>> On Mon, Jan 24, 2022 at 11:30:10AM +0100, Vlastimil Babka wrote:
>>>>>On 1/23/22 02:38, Wei Yang wrote:
>>>>>
>>>>>I can offer my insight (which might be of course wrong). Ideally one day
>>>>>page.lru will be gone and only folio will be used for LRU pages. Then there
>>>>>won't be a  FOLIO_MATCH(lru, lru); and FOLIO_MATCH(compound_head, lru);
>>>>>won't appear to be redundant anymore. lru is list_head so two pointers and
>>>> 
>>>> Thanks for your comment.
>>>> 
>>>> I can't imagine the final result. If we would remove page.lru, we could remove
>>>> FOLIO_MATCH(lru, lru) and add FOLIO_MATCH(compound_head, lru) at that moment?
>>>
>>>Yes, or we could forget to do it. Adding it right now is another option that
>>>Matthew has chosen and I don't see a strong reason to change it. Can you
>>>measure a kernel build speedup thanks to removing the now redundant check?
>>>
>> 
>> If we forget to do it, the compile would fail, right?
>
>No, FOLIO_MATCH is like a build-time assert. It can only fail if the assert
>is there, and the condition evaluates to false.

Currently we have this check

  FOLIO_MATCH(lru, lru)

Which checks page->lru and folio->lru.

As you mentioned page->lru would be gone. So this check would fail at compile?


-- 
Wei Yang
Help you, Help me

  reply	other threads:[~2022-01-29  0:47 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-06 23:52 [PATCH] mm: remove offset check on page->compound_head and folio->lru Wei Yang
2022-01-07  3:59 ` Matthew Wilcox
2022-01-07 13:40   ` Wei Yang
2022-01-07 22:11     ` Matthew Wilcox
2022-01-08  0:08       ` Andrew Morton
2022-01-08  0:49         ` Matthew Wilcox
2022-01-08  2:41           ` Andrew Morton
2022-01-08  8:13           ` Wei Yang
2022-01-23  1:38             ` Wei Yang
2022-01-24 10:30               ` Vlastimil Babka
2022-01-24 22:55                 ` Wei Yang
2022-01-25 10:11                   ` Vlastimil Babka
2022-01-27  1:10                     ` Wei Yang
2022-01-27 15:42                       ` Vlastimil Babka
2022-01-29  0:47                         ` Wei Yang [this message]
2022-02-24  1:03                 ` Wei Yang
2022-02-17  0:34           ` Wei Yang
2022-01-08  0:27       ` Wei Yang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220129004739.d2b3dqiv3qw6dfhs@master \
    --to=richard.weiyang@gmail.com \
    --cc=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=ebiederm@xmission.com \
    --cc=feng.tang@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linyunsheng@huawei.com \
    --cc=peterz@infradead.org \
    --cc=vbabka@suse.cz \
    --cc=will@kernel.org \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox