lkml.org 
[lkml]   [2006]   [Feb]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mm: Implement Swap Prefetching v22
Hi,
Con Kolivas wrote:
> +void add_to_swapped_list(struct page *page)
> +{
> + struct swapped_entry *entry;
> + unsigned long index;
> +
> + spin_lock(&swapped.lock);
> + if (swapped.count >= swapped.maxcount) {

Assume x86 system with 8G memory, swapped_maxcount is maybe 5G+ here.
Then, swapped_entry can consume 5G/PAGE_SIZE * 16bytes = 10 M byte more slabs from
ZONE_NORMAL. Could you add check like this?
==
void add_to_swapped_list(struct page *page)
{
<snip>
if (!swap_prefetch)
return;
spin_lcok(&spwapped.lock);
}
==
Thanks,
-- Kame

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-02-10 01:53    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site