Re: [PATCH] drop page cache of a single file

From: Russell King
Date: Thu Dec 28 2006 - 05:45:41 EST

On Thu, Dec 28, 2006 at 02:29:26AM -0800, Andrew Morton wrote:
> On Thu, 28 Dec 2006 15:19:04 +0800
> Fengguang Wu <fengguang.wu@xxxxxxxxx> wrote:
> > Yanmin: I've been using the fadvise tool from
> >
> >
> > It's a nice tool:
> >
> > % fadvise
> > Usage: fadvise filename offset length advice [loops]
> > advice: normal sequential willneed noreuse dontneed asyncwrite writewait
> > % fadvise /var/sparse 0 0x7fffffff dontneed
> >
> I was a bit reluctant to point at that because it has nasty hacks to make
> it mostly-work on old glibc's which don't implement posix_fadvise().
> Hopefully if you're running a recent distro, you have glibc support for
> fadvise() and it's possible to write a portable version of that app which
> doesn't need to know about per-arch syscall numbers.

And note that if it gets implemented on ARM on pre-fadvise() glibc,
the syscall argument order is rather non-standard: fd, action, start,
size rather than fd, start, size, action - since otherwise we run out
of registers with EABI.

The kernel community needs to get a grip with the implementation of
new syscalls - we need a process where architecture maintainers get
to review the arguments _prior_ to them being accepted into the kernel.
That way we can avoid silly architecture specific syscall changes like

Russell King
Linux kernel 2.6 ARM Linux -
maintainer of:
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at