Re: [PATCH] dentry/inode accounting for vm_enough_mem()

From: Andrew Morton (akpm@digeo.com)
Date: Tue May 20 2003 - 04:27:01 EST


Dave Hansen <haveblue@us.ibm.com> wrote:
>
> struct dentry_stat_t {
> int nr_dentry;
> int nr_unused;
> + atomic_t nr_alloced;
> int age_limit; /* age in seconds */
> int want_pages; /* pages requested by system */
> int dummy[2];

We're not at liberty to do this because /proc/sys/fs/dentry-state and
inode-state are implemented assuming that these structs are an array of
integers. It'll screw up if the architecture's "int" and "atomic_t"
representations are different.

Probably you can just make this an integer and add a spinlock for it, or
not place it in dentry_stat.

Seems otherwise OK though. Thanks.
-
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/



This archive was generated by hypermail 2b29 : Fri May 23 2003 - 22:00:39 EST