lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABF+-6VAWVM=Cpyjk4iTbG-bBfHUs_CfRhe7rXmxxiF_ZX7_OA@mail.gmail.com>
Date:	Wed, 25 Jul 2012 10:43:36 -0400
From:	Kevin Groeneveld <kgroeneveld@...il.com>
To:	Eric Dumazet <eric.dumazet@...il.com>
Cc:	netdev@...r.kernel.org
Subject: Re: [PATCH] ppp: add 64 bit stats

On Wed, Jul 25, 2012 at 12:04 AM, Eric Dumazet <eric.dumazet@...il.com> wrote:
> It there are spinlocks already, why even adding u64_stats_sync ?

That is a good question I have already wondered about myself.

>include/linux/u64_stats_sync.h
>
>* 3) Write side must ensure mutual exclusion or one seqcount update could
> *    be lost, thus blocking readers forever.
> *    If this synchronization point is not a mutex, but a spinlock or
> *    spinlock_bh() or disable_bh() :

It seems the u64_stats_sync requires some form of mutual exclusion.
So why bother ever using it at all?  Maybe there are cases where the
required mutual exclusion can be cheaper than a spinlock?  Maybe it is
just to avoid the spinlocks on the read side of things?

I hope you don't mind all my questions...
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ