Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1622822

Re: [PATCH 2/6] locking: Introduce range reader/writer lock

From Jan Kara <jack@suse.cz>
Newsgroups linux.kernel
Subject Re: [PATCH 2/6] locking: Introduce range reader/writer lock
Date 2017-04-13 10:40 +0200
Message-ID <tvIsh-kh-17@gated-at.bofh.it> (permalink)
References <ttbh9-6aP-61@gated-at.bofh.it> <ttbqO-6ei-37@gated-at.bofh.it> <ttbAx-6xa-79@gated-at.bofh.it> <ttiVj-3pQ-1@gated-at.bofh.it> <tvHZf-89-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu 13-04-17 10:07:48, Laurent Dufour wrote:
> On 06/04/2017 18:50, Davidlohr Bueso wrote:
> > On Thu, 06 Apr 2017, Laurent Dufour wrote:
> > 
> >> How is 'seqnum' wrapping handled here ?
> >> I'd rather see something like time_before() here, isn't it ?
> > 
> > Its a 64bit counter, no overflows.
> 
> I should have miss something, what prevents this 64bit counter to not
> overflow ?
> At some point of time, this counter could reach ~0UL and then 0UL, which
> is breaking this check.

Count for yourself how long would it take for the counter to overflow if we
incremented it say every nanosecond?

								Honza
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH 2/6] locking: Introduce range reader/writer lock Laurent Dufour <ldufour@linux.vnet.ibm.com> - 2017-04-13 10:10 +0200
  Re: [PATCH 2/6] locking: Introduce range reader/writer lock Jan Kara <jack@suse.cz> - 2017-04-13 10:40 +0200
    Re: [PATCH 2/6] locking: Introduce range reader/writer lock Laurent Dufour <ldufour@linux.vnet.ibm.com> - 2017-04-13 11:00 +0200

csiph-web