[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: |
Sun, 26 Feb 2012 09:41:56 +0100 |
Bernhard Voelker wrote:
> On 02/18/2012 02:06 PM, Jim Meyering wrote:
>>> > See the attached getxattr-speedup.log.gz - I added a "cat k.c" so that
>>> > you can check that I got your patch right.
>>> > It seems that GCC doesn't like our "__attribute__((destructor)) void p()".
>>> > It basically works in a standalone program, but not with LD_PRELOAD.
>>> > I didn't find much about this. Can this be a 64-bit issue?
>>
>> Is that an open-suse system?
>> I tried on an opensuse system with 2.6.37.6-0.11-desktop,
>> and since there were no getxattr calls at all, no wrapper
>> would run, and hence, your atexit call would never be reached.
>> I've added this comment at the top:
>
> Yes, it is a OpenSuSE 12.1 with kernel 3.1.9-1.4-desktop.
>
>> # This test is skipped on systems that lack LD_PRELOAD support; that's
>> fine.
>
> It doesn't lack LD_PRELOAD support, it simply doesn't call the destructor.
That comment was not intended to describe your case,
but rather any system that lacks LD_PRELOAD support.
>> + # Similarly, on a system that lacks getxattr altogether, skipping it is
>> fine.
>>
>> and this new skip_ use below:
>>
>> test -f x || skip_ "internal test failure: maybe LD_PRELOAD doesn't work?"
>>
>> Which may mean this test will simply be skipped on your system.
>> But that is fine.
>
> Maybe, but why is LD_PRELOAD honoring the "__attribute__((destructor))",
> and on some systems not?
Good question.
There must be some OpenSuSE 12.1 users willing to investigate.
Filing a bug report should get their attention.
>> +ld -G k.o -lc -o k.so || framework_failure_ 'failed to invoke ld -G ...'
>
> I just added "-lc" for pulling in atexit(). It's not needed in your version.
Thanks.
>From 641143a0cc613a503b80457b3c64dc46c9864980 Mon Sep 17 00:00:00 2001
From: Bernhard Voelker <address@hidden>
Date: Fri, 24 Feb 2012 12:22:20 +0100
Subject: [PATCH] tests: remove unnecessary use of -lc
* tests/ls/getxattr-speedup: Remove unneeded use of -lc.
---
tests/ls/getxattr-speedup | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/ls/getxattr-speedup b/tests/ls/getxattr-speedup
index a35dd69..d32e24a 100755
--- a/tests/ls/getxattr-speedup
+++ b/tests/ls/getxattr-speedup
@@ -48,7 +48,7 @@ EOF
# Then compile/link it:
$CC -fPIC -O2 -c k.c || framework_failure_ 'failed to compile with -fPIC'
-ld -G k.o -lc -o k.so || framework_failure_ 'failed to invoke ld -G ...'
+ld -G k.o -o k.so || framework_failure_ 'failed to invoke ld -G ...'
# Create a few files:
seq 20 | xargs touch || framework_failure_
--
1.7.9.2.263.g9be8b7
- Re: "ls -l": Avoid unnecessary getxattr() overhead, (continued)
- Re: "ls -l": Avoid unnecessary getxattr() overhead, Jim Meyering, 2012/02/20
- Re: "ls -l": Avoid unnecessary getxattr() overhead, Eric Blake, 2012/02/17
- Re: "ls -l": Avoid unnecessary getxattr() overhead, Jim Meyering, 2012/02/17
- Re: "ls -l": Avoid unnecessary getxattr() overhead, Eric Blake, 2012/02/17
- Re: "ls -l": Avoid unnecessary getxattr() overhead, Jim Meyering, 2012/02/17
- Re: "ls -l": Avoid unnecessary getxattr() overhead, Bernhard Voelker, 2012/02/17
- Re: "ls -l": Avoid unnecessary getxattr() overhead, Jim Meyering, 2012/02/17
- Re: "ls -l": Avoid unnecessary getxattr() overhead, Bernhard Voelker, 2012/02/17
- Re: "ls -l": Avoid unnecessary getxattr() overhead, Jim Meyering, 2012/02/18
- Re: "ls -l": Avoid unnecessary getxattr() overhead, Bernhard Voelker, 2012/02/20
- Re: "ls -l": Avoid unnecessary getxattr() overhead,
Jim Meyering <=
- Re: "ls -l": Avoid unnecessary getxattr() overhead, Bernhard Voelker, 2012/02/27
- Re: "ls -l": Avoid unnecessary getxattr() overhead, Jim Meyering, 2012/02/27
- Re: "ls -l": Avoid unnecessary getxattr() overhead, address@hidden, 2012/02/28
- Re: "ls -l": Avoid unnecessary getxattr() overhead, Pádraig Brady, 2012/02/17
- Re: "ls -l": Avoid unnecessary getxattr() overhead, Jim Meyering, 2012/02/17
- Re: "ls -l": Avoid unnecessary getxattr() overhead, Sven Breuner, 2012/02/11
- Re: "ls -l": Avoid unnecessary getxattr() overhead, Pádraig Brady, 2012/02/11
- Re: "ls -l": Avoid unnecessary getxattr() overhead, Sven Breuner, 2012/02/06