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


Groups > linux.kernel > #1559827

Re: [PATCH v4 07/15] lockdep: Implement crossrelease feature

From Peter Zijlstra <peterz@infradead.org>
Newsgroups linux.kernel
Subject Re: [PATCH v4 07/15] lockdep: Implement crossrelease feature
Date 2017-01-16 16:20 +0100
Message-ID <t0heG-271-21@gated-at.bofh.it> (permalink)
References <sMlLb-7BJ-3@gated-at.bofh.it> <sMlLb-7BJ-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, Dec 09, 2016 at 02:12:03PM +0900, Byungchul Park wrote:
> +	/*
> +	 * We assign class_idx here redundantly even though following
> +	 * memcpy will cover it, in order to ensure a rcu reader can
> +	 * access the class_idx atomically without lock.
> +	 *
> +	 * Here we assume setting a word-sized variable is atomic.

which one, where?

> +	 */
> +	xlock->hlock.class_idx = hlock->class_idx;
> +	gen_id = (unsigned int)atomic_inc_return(&cross_gen_id);
> +	WRITE_ONCE(xlock->gen_id, gen_id);
> +	memcpy(&xlock->hlock, hlock, sizeof(struct held_lock));
> +	INIT_LIST_HEAD(&xlock->xlock_entry);
> +	list_add_tail_rcu(&xlock->xlock_entry, &xlocks_head);

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


Thread

Re: [PATCH v4 07/15] lockdep: Implement crossrelease feature Peter Zijlstra <peterz@infradead.org> - 2017-01-16 16:20 +0100
  Re: [PATCH v4 07/15] lockdep: Implement crossrelease feature Byungchul Park <byungchul.park@lge.com> - 2017-01-17 03:40 +0100
    Re: [PATCH v4 07/15] lockdep: Implement crossrelease feature Boqun Feng <boqun.feng@gmail.com> - 2017-01-17 07:30 +0100
      Re: [PATCH v4 07/15] lockdep: Implement crossrelease feature Byungchul Park <byungchul.park@lge.com> - 2017-01-17 08:50 +0100

csiph-web