linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Rik van Riel <riel@redhat.com>
Cc: linux-mm@kvack.org
Subject: Re: [RFC][PATCH 2/6] CART Implementation
Date: Mon, 29 Aug 2005 06:15:07 +0200	[thread overview]
Message-ID: <1125288907.20161.111.camel@twins> (raw)
In-Reply-To: <Pine.LNX.4.63.0508282301390.13831@cuia.boston.redhat.com>

On Sun, 2005-08-28 at 23:02 -0400, Rik van Riel wrote:
> On Sat, 27 Aug 2005, a.p.zijlstra@chello.nl wrote:
> 
> > +static void bucket_stats(struct nr_bucket * nr_bucket, int * b1, int * b2)
> > +{
> > +	unsigned int i, b[2] = {0, 0};
> > +	for (i = 0; i < 2; ++i) {
> > +		unsigned int j = nr_bucket->hand[i];
> > +		do
> > +		{
> > +			u32 *slot = &nr_bucket->slot[j];
> > +			if (!!(GET_FLAGS(*slot) & NR_list) != !!i)
> > +				break;
> > +
> > +			j = GET_INDEX(*slot);
> > +			++b[i];
> > +		} while (j != nr_bucket->hand[i]);
> 
> Does this properly skip empty slots ?

There are no empty slots. This thing always has B1_j + B2_j = NR_SLOTS.
I couldn't manage keeping track of two lists and empty slots. It doesn't
really matter though. I just have to start out with |B1| = 0 and |B2| =
c. I fill B2_j with zero cookies, so getting a hit there is very
unlikely, that way they just get overwritten due to old age and all is
well.

> 
> Remember that a page that got paged in leaves a zeroed
> out slot in the bucket...
> 
Yeah, I was playing aroung with that. I'll change that back because it
does indeed generate a problem elsewhere.

-- 
Peter Zijlstra <a.p.zijlstra@chello.nl>

--
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-29  4:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-27 21:57 [RFC][PATCH 0/6] " a.p.zijlstra
2005-08-27 21:57 ` [RFC][PATCH 1/6] " a.p.zijlstra
2005-08-27 21:57 ` [RFC][PATCH 2/6] " a.p.zijlstra
2005-08-29  3:02   ` Rik van Riel
2005-08-29  4:15     ` Peter Zijlstra [this message]
2005-08-29  6:20       ` Peter Zijlstra
2005-08-27 21:57 ` [RFC][PATCH 3/6] " a.p.zijlstra
2005-08-27 21:58 ` [RFC][PATCH 4/6] " a.p.zijlstra
2005-08-27 21:58 ` [RFC][PATCH 5/6] " a.p.zijlstra
2005-08-27 21:58 ` [RFC][PATCH 6/6] " a.p.zijlstra
2005-08-28  0:25 ` [RFC][PATCH 0/6] " Marcelo Tosatti
2005-08-28  8:03   ` 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=1125288907.20161.111.camel@twins \
    --to=a.p.zijlstra@chello.nl \
    --cc=linux-mm@kvack.org \
    --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