Dear Peter,

Thanks for the great help.

Just asking, If I have to include this function [ drop_caches_sysctl_handler
] , then what should I do ? Shall I export it and compile the kernel or is
there any other means to do it.

Second, I just want to know that there will be lots of hurdels to set the
arguments of above handler, So, if I only export
static void drop_pagecache(void) function in kernel & include this in my
driver, would it work as per the expectation ?

May be I am wrong, but please correct if the above method need any
modification?

Thanks & Best regards,
Krishna






On Fri, Jul 17, 2009 at 8:11 PM, Peter Teoh <[email protected]> wrote:

> sorry....my previous was accidentally sent out halfway...specifically
> detailing on the implementation of  drop_caches_sysctl_handler():
>
> > and reading into the implementation, it just wipe away all the dirty
> > buffer cache (as the name implies).   Not really the type of flushing
> > I originally meant - which is to write back the dirty buffer cache to
> > the backing store.
> >
> drop_caches_sysctl_handler()--->
> drop_pagecache()--->drop_pagecache_sb()--->invalidate_mapping_pages().
>
> where invalidate_mappping_pages() is in mm/truncate.c.....and so on.
>
> and as drop_pagecache_sb() is done for each filesystem's superblock,
> which is why my initial statement is that it is performance-heavy.
> if u know what to flush out, doing it directly will be much better.
>

Reply via email to