[lkml]   [2005]   [Aug]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] removes filp_count_lock and changes nr_files type to atomic_t
Nick Piggin a écrit :

> OK, well I would prefer you do the proper atomic operations throughout
> where it "really matters" in file_table.c, and do your lazy synchronize
> with just the sysctl exported value.

But... I got complains about atomic_read(&counter) being 'an atomic op'
(untrue), so my second patch just doesnt touch the path where nr_files was read.

Furthermore, a lazy sync would mean to change sysctl proc_handler for
"file-nr" to perform a synchronize before calling proc_dointvec, this would be
really obscure.

> Unless the fs people had a problem with that.
> And you may as well get rid of the atomic_inc_return which can be more
> expensive on some platforms and doesn't buy you much.
> atomic_inc;
> atomic_read;
> Should be enough if you don't care about lost updates here, yeah?

You mean :

lazeyvalue = atomic_read(&counter);

instead of

lazeyvalue = atomic_inc_return(&counter);

In fact I couldnt find one architecture where the later would be more expensive.

> Nick

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-08-25 17:15    [W:0.039 / U:2.472 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site