Re: [PATCH 03/34] include: copy unlocked-io.h from gnulib

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

 



On Tue, Jul 9, 2013 at 8:37 AM, Sami Kerola <kerolasa@xxxxxx> wrote:
> On 8 July 2013 21:21, Kay Sievers <kay@xxxxxxxx> wrote:
>> On Sun, Jul 7, 2013 at 9:54 PM, Sami Kerola <kerolasa@xxxxxx> wrote:
>>> At the moment util-linux command are not threading, which means they can
>>> safely use thread-unsafe IO system calls which should make printing
>>> quicker.
>>
>> Do you have numbers about the assumption that this will produce better
>> results on Linux?
>>
>> Uncontended mutexes/futexes on Linux probably might not really show
>> up. Maybe in inner loops, not sure. Would be nice to know ...
>
> I did not do much testing, and to be honest results were slightly
> disappointing. With simple 'time command < big_file' most of the
> commands did not show measurable difference, but as a junior
> programmer I thought the _unlocked would be beneficial for single
> thread programs. As such assumptions are not preferred I will set up
> some sort of test, which will try to accomplish what is the difference
> of each locked vs _unlocked function call with various output sizes.
> Assuming I get the test right it should not be a big deal to run it on
> various systems I have access.

Here is a bit of the background, which explains a bit why uncontended
futexes (which is always the case in single-threaded programs) might
not really make a difference on common Linux architectures. They will
not even involve the kernel, just a simple instruction:
  http://lwn.net/Articles/360699/

Kay
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux