linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Minwoo Jo <chminoo@g.cbnu.ac.kr>
Cc: akpm@linux-foundation.org, linux-mm@kvack.org
Subject: Re: [PATCH] HitShield:Something new eviction process for MGLRU
Date: Sat, 20 Jul 2024 16:34:21 +0100	[thread overview]
Message-ID: <ZpvY_aZV4VtMmXP-@casper.infradead.org> (raw)
In-Reply-To: <20240720142528.276861-1-chminoo@g.cbnu.ac.kr>

On Sat, Jul 20, 2024 at 11:25:28PM +0900, Minwoo Jo wrote:
> This hitshield technique was devised based on the observation that MGLRU
> does not consider the state of the folio when performing eviction.
> 
> The assumption is that if a folio that has been updated 1-3 times and not
> frequently updated accumulates generations until it is evicted, it is
> likely to have a low probability of being referenced in the future.

Hi Minwoo.  This is interesting work.  Thank you for sending it out.
I do not consider myself qualified to comment on your assumption, but
I have some feedback on your implementation.

> diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
> index a199c48bc462..053d5620574e 100644
> --- a/include/linux/mm_types.h
> +++ b/include/linux/mm_types.h
> @@ -189,6 +189,12 @@ struct page {
>  	void *virtual;			/* Kernel virtual address (NULL if
>  					   not kmapped, ie. highmem) */
>  #endif /* WANT_PAGE_VIRTUAL */
> +	unsigned char hit_shield;	/*
> +					 * The hit_shield variable I added to the page
> +					 * This variable is responsible for counting
> +					 * the number of times this
> +					 * page's generation has been updated.
> +					 */

We don't really have space in struct page for this kind of thing,
unfortunately.  There are a _few_ bits available in page->flags on
64-bit, but even that is a bit tenuous.



  reply	other threads:[~2024-07-20 15:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-20 14:25 Minwoo Jo
2024-07-20 15:34 ` Matthew Wilcox [this message]
2024-08-02  0:05 [PATCH] Hitshield : Something " Minwoo Jo
2024-08-05 11:29 ` Vlastimil Babka
2024-08-05 11:56 ` David Hildenbrand
2024-10-08 18:50 ` SeongJae Park
2024-10-28  7:32   ` Minwoo Jo
     [not found] <20241008084411.196455-1-chminoo@g.cbnu.ac.kr>
     [not found] ` <b78d1aa5-1de4-4050-80a5-cbd4bc1eb8f2@efficios.com>
     [not found]   ` <c84e6cb4-646c-4b70-9834-3d0f66f51787@efficios.com>
2024-10-08 16:04     ` Minwoo Jo

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=ZpvY_aZV4VtMmXP-@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=chminoo@g.cbnu.ac.kr \
    --cc=linux-mm@kvack.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