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


Groups > linux.kernel > #1467771

Re: [PATCH tip/core/rcu 2/2] documentation: Record reason for rcu_head two-byte alignment

From Peter Zijlstra <peterz@infradead.org>
Newsgroups linux.kernel
Subject Re: [PATCH tip/core/rcu 2/2] documentation: Record reason for rcu_head two-byte alignment
Date 2016-08-22 18:30 +0200
Message-ID <s90gO-ck-27@gated-at.bofh.it> (permalink)
References <s8Zb4-7Xs-7@gated-at.bofh.it> <s8Zb4-7Xs-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, Aug 22, 2016 at 08:14:43AM -0700, Paul E. McKenney wrote:
> The __call_rcu() assertion that checks only the bottom bit of the
> rcu_head pointer is a bit counter-intuitive in these days of ubiquitous
> 64-bit systems.  This commit therefore records the reason for this
> odd alignment check, namely that m68k guarantees only two-byte alignment
> despite being a 32-bit architectures.

Would not something like:

#ifdef CONFIG_M68K
	/*
	 * m68k is weird and doesn't have naturally aligned types.
	 */
	WARN_ON_ONCE((unsigned long)head & 1);
#else
	WARN_ON_ONCE((unsigned long)head & (sizeof(unsigned long) - 1));
#endif

Be better?

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


Thread

[PATCH tip/core/rcu 0/2] Documentation updates "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-08-22 17:20 +0200
  [PATCH tip/core/rcu 2/2] documentation: Record reason for rcu_head two-byte alignment "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-08-22 17:20 +0200
    Re: [PATCH tip/core/rcu 2/2] documentation: Record reason for  rcu_head two-byte alignment Peter Zijlstra <peterz@infradead.org> - 2016-08-22 18:30 +0200
      Re: [PATCH tip/core/rcu 2/2] documentation: Record reason for  rcu_head two-byte alignment "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-08-22 19:40 +0200
        Re: [PATCH tip/core/rcu 2/2] documentation: Record reason for  rcu_head two-byte alignment Eric Dumazet <edumazet@google.com> - 2016-08-22 20:50 +0200
          Re: [PATCH tip/core/rcu 2/2] documentation: Record reason for  rcu_head two-byte alignment Peter Zijlstra <peterz@infradead.org> - 2016-08-22 21:00 +0200
            Re: [PATCH tip/core/rcu 2/2] documentation: Record reason for  rcu_head two-byte alignment Steven Rostedt <rostedt@goodmis.org> - 2016-08-22 21:20 +0200
              Re: [PATCH tip/core/rcu 2/2] documentation: Record reason for  rcu_head two-byte alignment "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-08-22 22:00 +0200
                Re: [PATCH tip/core/rcu 2/2] documentation: Record reason for  rcu_head two-byte alignment Geert Uytterhoeven <geert@linux-m68k.org> - 2016-08-22 22:50 +0200
                Re: [PATCH tip/core/rcu 2/2] documentation: Record reason for  rcu_head two-byte alignment "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-08-22 23:20 +0200
                Re: [PATCH tip/core/rcu 2/2] documentation: Record reason for  rcu_head two-byte alignment Geert Uytterhoeven <geert@linux-m68k.org> - 2016-08-23 08:40 +0200
                Re: [PATCH tip/core/rcu 2/2] documentation: Record reason for  rcu_head two-byte alignment "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-08-23 15:50 +0200
                Re: [PATCH tip/core/rcu 2/2] documentation: Record reason for  rcu_head two-byte alignment Geert Uytterhoeven <geert@linux-m68k.org> - 2016-08-23 16:10 +0200
                Re: [PATCH tip/core/rcu 2/2] documentation: Record reason for  rcu_head two-byte alignment Geert Uytterhoeven <geert@linux-m68k.org> - 2016-08-23 16:40 +0200
                Re: [PATCH tip/core/rcu 2/2] documentation: Record reason for  rcu_head two-byte alignment "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-08-23 22:00 +0200
                Re: [PATCH tip/core/rcu 2/2] documentation: Record reason for  rcu_head two-byte alignment "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-08-23 20:50 +0200
                Re: [PATCH tip/core/rcu 2/2] documentation: Record reason for  rcu_head two-byte alignment "Kirill A. Shutemov" <kirill@shutemov.name> - 2016-08-24 20:10 +0200
  [PATCH tip/core/rcu 1/2] rcutorture: Remove outdated config option description "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-08-22 17:20 +0200

csiph-web