lkml.org 
[lkml]   [2005]   [Aug]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] struct file cleanup : the very large file_ra_state is now allocated only on demand.
From
From: Eric Dumazet <dada1@cosmosbay.com>
Date: Thu, 18 Aug 2005 09:14:47 +0200

> After reading your suggestions, I understand we still need two slabs.
> One (filp_cachep) without the readahead data, the other one
> (filp_ra_cachep) with it.

Correct.

> static inline struct file_ra_state *get_ra_state(struct file *f)
> {
> #ifdef CONFIG_DEBUG_READAHEAD
> BUG_ON(filp_ra_cachep != GET_PAGE_CACHE(virt_to_page(f)));
> #endif
> return (struct file_ra_state *)(f+1);
> }

Or, instead of mucking with SLAB internals, just put something like
a "filp_ra_present" debugging binary state into filp while it gets
debugged.

-
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: 2005-08-18 09:21    [W:2.477 / U:0.424 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site