aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2010-01-01 17:43:53 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2010-03-15 12:06:26 -0400
commit768941b8ee188e169547e6ff97c5e46dda0e16a8 (patch)
treeeda4035b2e1041294fac2ef233be9b63c52b407c /drivers/char
parentb7d0e6b45107dfc86224c4f72bee12051d1fdb54 (diff)
sysfs: Cache the last sysfs_dirent to improve readdir scalability v2
commit 1e5289c97bba2d8ee7239a416bc3f28743362cd9 upstream. When sysfs_readdir stops short we now cache the next sysfs_dirent to return to user space in filp->private_data. There is no impact on the rest of sysfs by doing this and in the common case it allows us to pick up exactly where we left off with no seeking. Additionally I drop and regrab the sysfs_mutex around filldir to avoid a page fault abritrarily increasing the hold time on the sysfs_mutex. v2: Returned to using INT_MAX as the EOF condition. seekdir is ambiguous unless all directory entries have a unique f_pos value. Fixes http://bugzilla.kernel.org/show_bug.cgi?id=14949 Signed-off-by: Eric W. Biederman <ebiederm@aristanetworks.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/char')
0 files changed, 0 insertions, 0 deletions