lkml.org 
[lkml]   [2008]   [Jul]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: debugfs_create_u*() not SMP-safe
On Fri, Jul 18, 2008 at 06:52:37AM +0300, Eduard - Gabriel Munteanu wrote:
> Hi,
>
> I noticed debugfs_create_u*() functions don't allow for any precautions
> to be taken while doing r/w to the exported variables. Thus any export of a
> variable isn't SMP-safe.

That's true, so don't do multiple writes to a debugfs file at the same
time :)

> As far as I can tell, this only works safely for constant data. Let me
> ask then, what is the purpose of these functions? Are they intended only
> for unreliable data?

This is for _debug_ data, not stuff that is "critical". This is for
informational or debug purposes only. If you really care about the data
always being correct here, then don't use debugfs, that's not what it is
for.

Hope this helps,

greg k-h


\
 
 \ /
  Last update: 2008-07-18 20:59    [W:2.297 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site