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

Andrew Morton (akpm@digeo.com)
Tue, 20 May 2003 02:27:01 -0700


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/