* that page count overflow thing
@ 2007-05-19 22:26 David Miller
2007-05-21 11:37 ` William Lee Irwin III
0 siblings, 1 reply; 4+ messages in thread
From: David Miller @ 2007-05-19 22:26 UTC (permalink / raw)
To: akpm; +Cc: linux-kernel
I think we may be able to fix that one without making the
counter larger, it's silly overhead for such an extreme
case IMHO.
Perhaps it might be possible to just make the counter stick at it's
maximum, and when it's there we have an rbtree of external "large"
counters, keyed by page struct address.
So basically externalize counters that go over the maximally
representable value. In this way only the idiotic cases pay
the price.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: that page count overflow thing
2007-05-19 22:26 that page count overflow thing David Miller
@ 2007-05-21 11:37 ` William Lee Irwin III
2007-05-21 11:50 ` David Miller
0 siblings, 1 reply; 4+ messages in thread
From: William Lee Irwin III @ 2007-05-21 11:37 UTC (permalink / raw)
To: David Miller; +Cc: akpm, linux-kernel
On Sat, May 19, 2007 at 03:26:49PM -0700, David Miller wrote:
> I think we may be able to fix that one without making the
> counter larger, it's silly overhead for such an extreme
> case IMHO.
> Perhaps it might be possible to just make the counter stick at it's
> maximum, and when it's there we have an rbtree of external "large"
> counters, keyed by page struct address.
> So basically externalize counters that go over the maximally
> representable value. In this way only the idiotic cases pay
> the price.
This could be awkward with allocation requirements. How about an
open-addressed hash table? It can be made so large as to never
need to expand in advance with a very small constant factor space
overhead.
-- wli
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: that page count overflow thing
2007-05-21 11:37 ` William Lee Irwin III
@ 2007-05-21 11:50 ` David Miller
2007-05-21 12:16 ` William Lee Irwin III
0 siblings, 1 reply; 4+ messages in thread
From: David Miller @ 2007-05-21 11:50 UTC (permalink / raw)
To: wli; +Cc: akpm, linux-kernel
From: William Lee Irwin III <wli@holomorphy.com>
Date: Mon, 21 May 2007 04:37:47 -0700
> This could be awkward with allocation requirements. How about an
> open-addressed hash table? It can be made so large as to never
> need to expand in advance with a very small constant factor space
> overhead.
I was just thinking of a normal hash table with entries that
looked simply like:
struct page_big_count_hash {
struct page_big_count_hash *next; /* or list_head or hlist_head etc. */
struct page *key;
atomic64_t count;
};
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: that page count overflow thing
2007-05-21 11:50 ` David Miller
@ 2007-05-21 12:16 ` William Lee Irwin III
0 siblings, 0 replies; 4+ messages in thread
From: William Lee Irwin III @ 2007-05-21 12:16 UTC (permalink / raw)
To: David Miller; +Cc: akpm, linux-kernel
> From: William Lee Irwin III <wli@holomorphy.com>
> Date: Mon, 21 May 2007 04:37:47 -0700
>> This could be awkward with allocation requirements. How about an
>> open-addressed hash table? It can be made so large as to never
>> need to expand in advance with a very small constant factor space
>> overhead.
On Mon, May 21, 2007 at 04:50:31AM -0700, David Miller wrote:
> I was just thinking of a normal hash table with entries that
> looked simply like:
> struct page_big_count_hash {
> struct page_big_count_hash *next; /* or list_head or hlist_head etc. */
> struct page *key;
> atomic64_t count;
> };
I guess that could work with a static pool of hashtable elements like
mm/highmem.c uses, but the pointer links seem like such a waste of space.
It'll work, so no big deal. Maybe converting mm/highmem.c to hashing by
open addressing would be a simplification. Not worth disturbing working
code, though.
-- wli
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-05-21 12:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-19 22:26 that page count overflow thing David Miller
2007-05-21 11:37 ` William Lee Irwin III
2007-05-21 11:50 ` David Miller
2007-05-21 12:16 ` William Lee Irwin III
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox