linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: corbet@lwn.net (Jonathan Corbet)
To: Con Kolivas <kernel@kolivas.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] vm - swap_prefetch-11
Date: Tue, 27 Sep 2005 12:56:35 -0600	[thread overview]
Message-ID: <20050927185635.8023.qmail@lwn.net> (raw)
In-Reply-To: Your message of "Fri, 23 Sep 2005 17:11:47 +1000." <200509231711.47822.kernel@kolivas.org>

Hi, Con,

> This patch implements swap prefetching when the vm is relatively idle and
> there is free ram available. 

I'm having a look at it now (better late than never...), and a couple of
questions come to mind...

The more general of the two is: would it make sense to somehow merge
your swapped_entry data structure with Rik's page-remembering scheme for
CLOCK-PRO?  Assumed that both are someday destined for inclusion, it
seems it would make sense to add just one "remember info about swapped
pages" data structure, rather than two.

Second question:

> +++ linux-2.6.13-sp/include/linux/fs.h	2005-09-23 16:57:03.000000000 +1000
> @@ -340,6 +340,8 @@ struct address_space {
>  	struct inode		*host;		/* owner: inode, block_device */
>  	struct radix_tree_root	page_tree;	/* radix tree of all pages */
>  	rwlock_t		tree_lock;	/* and rwlock protecting it */
> +	struct radix_tree_root	swap_tree;	/* radix tree of swapped pages */
> +	struct list_head	swapped_pages;	/* list of swapped pages */

It looks like you are adding these fields to every address_space
structure in the system - and there can be a fair number of those.  But
further down, when it comes time to remember a swapped page:

> +void add_to_swapped_list(unsigned long index)
> +{
> +	struct swapped_entry_t *entry;
> +	struct address_space *mapping = &swapper_space;

You're only actually remembering pages associated with a single address
space.  

Do you anticipate adding prefetching from other address spaces as well?
If not, it might be worth putting these structures somewhere else to
avoid bloating the address_space structure.

...or am I missing something again...?

Thanks,

jon

  reply	other threads:[~2005-09-27 18:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-23  7:11 [PATCH] vm - swap_prefetch-11 Con Kolivas
2005-09-27 18:56 ` Jonathan Corbet [this message]
2005-09-27 23:10   ` Con Kolivas

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=20050927185635.8023.qmail@lwn.net \
    --to=corbet@lwn.net \
    --cc=kernel@kolivas.org \
    --cc=linux-kernel@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).