linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Rahul Iyer <rni@andrew.cmu.edu>
To: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
	linux-mm@kvack.org, Rik van Riel <riel@redhat.com>
Subject: Re: Zoned CART
Date: Sat, 13 Aug 2005 15:00:46 -0400	[thread overview]
Message-ID: <42FE435E.6000806@andrew.cmu.edu> (raw)
In-Reply-To: <20050812230825.GB11168@dmt.cnet>

Hi Marcelo,

>I find it a very interesting idea to split the active list in two!  
>
>+#define EVICTED_ACTIVE                 1
>+#define EVICTED_LONGTERM       2
>+#define ACTIVE                 3
>+#define ACTIVE_LONGTERM                4
>
>You have different definitions using the same bit positions.
>Those values should be 1, 2, 4 and 8.
>  
>
Agreed! Dumb mistake.

>+#define EvictedActive(location)                location & EVICTED_ACTIVE
>+#define EvictedLongterm(location)      location & EVICTED_LONGTERM
>+#define Active(location)               location & ACTIVE
>+#define ActiveLongterm(location)       location & ACTIVE_LONGTERM
>
>(location  & xxxx) looks nicer.
>  
>
Will do this too...

>+struct non_res_list_node {
>+	struct list_head list;
>+	struct list_head hash;
>+	unsigned long mapping;
>+	unsigned long offset;
>+	unsigned long inode;
>+}; 
>
>+	node->offset = page->index;
>+	node->mapping = (unsigned long) page->mapping;
>+	node->inode = get_inode_num(page->mapping);
>
>You can compress these tree fields into a single one with a hash function.
>  
>
Yes, but then you would not be able to handle hash collisions. Are we 
prepared to give up this property?

>+/* The replace function. This function serches the active and longterm
>+lists and looks for a candidate for replacement. This function selects
>+the candidate and returns the corresponding structpage or returns
>+NULL in case no page can be freed. The *where argument is used to
>+indicate the parent list of the page so that, in case it cannot be
>+written back, it can be placed back on the correct list */ 
>+struct page *replace(struct zone *zone, int *where)
>
>+	list = list->next;
>+	while (list !=&zone->active_longterm) {
>+		page = list_entry(list, struct page, lru);
>+
>+		if (!PageReferenced(page))
>+			break;
>+		
>+		ClearPageReferenced(page);
>+		del_page_from_active_longterm(zone, page);
>+		add_page_to_active_list_tail(zone, page);
>
>This sounds odd. If a page is referenced you remove it from the longterm list
>"unpromoting" it to the active list? Shouldnt be the other way around?
>
>  
>
I'll re-check this in the CART paper. 

Currently I'm out of town, so i'll get this patch in with the 
corrections as soon as i get back.
Thanks
Rahul

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2005-08-13 19:00 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-12 14:37 Peter Zijlstra
2005-08-12 15:42 ` Rahul Iyer
2005-08-12 15:52   ` Peter Zijlstra
2005-08-12 23:08   ` Marcelo Tosatti
2005-08-13 19:00     ` Rahul Iyer [this message]
2005-08-13 19:08       ` Marcelo Tosatti
2005-08-13 21:30         ` Rik van Riel
2005-08-14 18:31     ` Peter Zijlstra
2005-08-12 20:21 ` Marcelo Tosatti
2005-08-12 22:28   ` Marcelo Tosatti
2005-08-13 19:03   ` Rahul Iyer
2005-08-14 12:58 ` Peter Zijlstra
2005-08-15 21:31   ` Peter Zijlstra
2005-08-16 19:53     ` Rahul Iyer
2005-08-16 20:49       ` Christoph Lameter
2005-08-25 22:39         ` Peter Zijlstra
2005-08-26  0:01           ` Christoph Lameter
2005-08-26  3:59             ` Rahul Iyer
2005-08-26  7:09             ` Peter Zijlstra
2005-08-26 12:24               ` Rik van Riel
2005-08-26 21:03   ` Peter Zijlstra
2005-08-27 19:46     ` [RFC][PATCH] " Peter Zijlstra

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=42FE435E.6000806@andrew.cmu.edu \
    --to=rni@andrew.cmu.edu \
    --cc=a.p.zijlstra@chello.nl \
    --cc=linux-mm@kvack.org \
    --cc=marcelo.tosatti@cyclades.com \
    --cc=riel@redhat.com \
    /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