coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "ls -l": Avoid unnecessary getxattr() overhead


From: Jim Meyering
Subject: Re: "ls -l": Avoid unnecessary getxattr() overhead
Date: Fri, 10 Feb 2012 09:18:44 +0100

Sven Breuner wrote:
> Jim Meyering wrote on 02/09/2012 04:08 PM:
>> I'm not as enthusiastic about adding code to optimize away
>> the calls in file_has_acl, unless there are mainstream system/FS
>> for which it makes a difference.
>
> Jim Meyering wrote on 02/09/2012 03:17 PM:
>> Here's that simpler patch:
>>
>> diff --git a/src/ls.c b/src/ls.c
>> index f5cd37a..cb9f834 100644
>> [...]
>
>
> Does cifs count as mainstream in this context?

Yes.
Which means it is worth making the change to cache failed file_has_acl, too.

> Here's a test run on rhel 6.2 (one machine exporting an ext4, the
> other one mounting via cifs with default settings),
> selinux_challenged_device patch already applied to ls:
>
> $ strace -c ~/tmp/ls-8.15.34-31eee_patched -l >/dev/null
> % time     seconds  usecs/call     calls    errors syscall
> ------ ----------- ----------- --------- --------- ----------------
>  44.56    0.186147           3     61440           lstat
>  38.94    0.162680           3     61440     61440 getxattr
>  15.80    0.065989         122       540           getdents
> [...]
>
> While this kind of large directory might not be very typical as a use
> case for cifs, I know at least quite a few cifs filer admins that
> would be happy about every single network request they could keep off
> of their filers to reduce load.

cifs is a big market.  Thanks for the info.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]