size limit for TMPFS

Eric Anderson anderson at freebsd.org
Fri May 18 13:10:18 UTC 2007


On 05/18/07 01:28, Howard Su wrote:
> On 5/17/07, Eric Anderson <anderson at freebsd.org> wrote:
>> Track the memory usage on your own?  As you allocate, keep a counter and
> This is doable. The down site for this is we need another mutex to
> protect this resource usage. This mutex will result performance issue.
> because this mutex is per mount point. and when alloc/read a node, a
> directory.

 From a quick glance, you are storing your inode count in the mount 
structure of the tmpfs.  So, anytime you do anything with the fs, you 
have to lock the mount struct anyway, so there's no additional mutex 
when updating the block count vs inode count, right?  Please correct me 
if I'm wrong here, since I'm still learning much about locking/vfs/etc.


>> total up the usage outside of uma.  (3) sounds good, except it may not
>> be accurate, and that could lead to confusion for someone.
> Can we state, the tmpfs size only limit to the file size. Meta data
> will not be counted. Meta data limit will be adjusted by the kernel
> resource or explicitly specified by the user.

Seems reasonable, and if it's documented in the man page, it should 
reduce any confusion.


Eric



More information about the freebsd-fs mailing list