linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: jasonp@boo.net
To: linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] page coloring for 2.5.59 kernel, version 1
Date: Tue, 28 Jan 2003 18:01:51 GMT	[thread overview]
Message-ID: <200301281801.NAA14177@boo-mda02.boo.net> (raw)

> 
> set_num_colors() needs to go downstairs under arch/ Some of the
> current->pid checks look a bit odd esp. for GFP_ATOMIC and/or
> in_interrupt() cases. I'm not sure why this is a config option; it
> should be mandatory. I also wonder about the interaction of this with
> the per-cpu lists. This may really want to be something like a matrix
> with (cpu, color) indices to find the right list; trouble is, there's a
> high potential for many pages to be trapped there. mapnr's (page -
> zone->zone_mem_map etc.) are being used for pfn's; this may raise
> issues if zones' required alignments aren't num_colors*PAGE_SIZE or
> larger. proc_misc.c can be used instead of page_color_init(). ->free_list
> can be removed. get_rand() needs locking, per-zone state. Useful stuff.

The current->pid tests date back to the 2.2 kernel patch, to get around
a bug where reusing an old task_struct didn't reinitialize the counter.
I'd much rather initialize the counter properly when a process starts, but
am not smart enough to track down all the places in the kernel where it
happens (kernel/fork.c only seems to account for half the pids on my system,
whereas in 2.4 virtually every process went through fork.c)

I originally had a much better RNG in place of the present one, but
at least one person didn't like explicit long-long calculations. Rather
than locking, what about the (admittedly much slower) nondeterministic RNG
interface? Also, the new __rmqueue is probably sufficiently slower than
the original (especially when accounting for non-power-of-two cache sizes)
that the latency for random numbers may not matter much.

Not sure how to handle pfn's properly in light of your observation, though.
What do you suggest? Likewise, I'll have to look at this per-cpu thing, older
patches didn't need to care about it.

Thanks to everyone for their feedback; I'll keep at it.

jasonp

---------------------------------------------
This message was sent using Endymion MailMan.
http://www.endymion.com/products/mailman/


--
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/

             reply	other threads:[~2003-01-28 18:01 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-28 18:01 jasonp [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-01-28 17:49 jasonp
     [not found] <3.0.6.32.20030127224726.00806c20@boo.net.suse.lists.linux.kernel>
     [not found] ` <884740000.1043737132@titus.suse.lists.linux.kernel>
     [not found]   ` <20030128071313.GH780@holomorphy.com.suse.lists.linux.kernel>
     [not found]     ` <1466000000.1043770007@titus.suse.lists.linux.kernel>
2003-01-28 16:37       ` Andi Kleen
2003-01-28 16:49         ` Martin J. Bligh
2003-01-28 17:06         ` Bill Davidsen
2003-01-28 17:22           ` Valdis.Kletnieks
2003-01-28  3:47 Jason Papadopoulos
2003-01-28  3:57 ` William Lee Irwin III
2003-01-28  4:11   ` William Lee Irwin III
2003-01-28  6:58 ` Martin J. Bligh
2003-01-28  7:13   ` William Lee Irwin III
2003-01-28 16:06     ` Martin J. Bligh
2003-01-28 16:41       ` Falk Hueffner

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=200301281801.NAA14177@boo-mda02.boo.net \
    --to=jasonp@boo.net \
    --cc=linux-kernel@vger.kernel.org \
    --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