Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1354708 > unrolled thread
| Started by | Rasmus Villemoes <linux@rasmusvillemoes.dk> |
|---|---|
| First post | 2016-03-10 01:20 +0100 |
| Last post | 2016-03-10 23:50 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH resend] linux/compiler.h: fix stale comment on {READ,WRITE}_ONCE Rasmus Villemoes <linux@rasmusvillemoes.dk> - 2016-03-10 01:20 +0100
Re: [PATCH resend] linux/compiler.h: fix stale comment on {READ,WRITE}_ONCE Andrew Morton <akpm@linux-foundation.org> - 2016-03-10 23:50 +0100
| From | Rasmus Villemoes <linux@rasmusvillemoes.dk> |
|---|---|
| Date | 2016-03-10 01:20 +0100 |
| Subject | [PATCH resend] linux/compiler.h: fix stale comment on {READ,WRITE}_ONCE |
| Message-ID | <raWuC-7q3-11@gated-at.bofh.it> |
Commit 7bd3e239d6c6 ("locking: Remove atomicy checks from
{READ,WRITE}_ONCE") removed said warning.
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
---
Andrew, can you pick this up please?
include/linux/compiler.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/include/linux/compiler.h b/include/linux/compiler.h
index 48f5aab117ae..062b6ad95276 100644
--- a/include/linux/compiler.h
+++ b/include/linux/compiler.h
@@ -263,8 +263,7 @@ static __always_inline void __write_once_size(volatile void *p, void *res, int s
* In contrast to ACCESS_ONCE these two macros will also work on aggregate
* data types like structs or unions. If the size of the accessed data
* type exceeds the word size of the machine (e.g., 32 bits or 64 bits)
- * READ_ONCE() and WRITE_ONCE() will fall back to memcpy and print a
- * compile-time warning.
+ * READ_ONCE() and WRITE_ONCE() will fall back to memcpy.
*
* Their two major use cases are: (1) Mediating communication between
* process-level code and irq/NMI handlers, all running on the same CPU,
--
2.1.4
[toc] | [next] | [standalone]
| From | Andrew Morton <akpm@linux-foundation.org> |
|---|---|
| Date | 2016-03-10 23:50 +0100 |
| Subject | Re: [PATCH resend] linux/compiler.h: fix stale comment on {READ,WRITE}_ONCE |
| Message-ID | <rbhz4-59y-5@gated-at.bofh.it> |
| In reply to | #1354708 |
On Thu, 10 Mar 2016 01:16:57 +0100 Rasmus Villemoes <linux@rasmusvillemoes.dk> wrote:
> Commit 7bd3e239d6c6 ("locking: Remove atomicy checks from
> {READ,WRITE}_ONCE") removed said warning.
>
> Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
> Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
> ---
> Andrew, can you pick this up please?
>
> include/linux/compiler.h | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/include/linux/compiler.h b/include/linux/compiler.h
> index 48f5aab117ae..062b6ad95276 100644
> --- a/include/linux/compiler.h
> +++ b/include/linux/compiler.h
> @@ -263,8 +263,7 @@ static __always_inline void __write_once_size(volatile void *p, void *res, int s
> * In contrast to ACCESS_ONCE these two macros will also work on aggregate
> * data types like structs or unions. If the size of the accessed data
> * type exceeds the word size of the machine (e.g., 32 bits or 64 bits)
> - * READ_ONCE() and WRITE_ONCE() will fall back to memcpy and print a
> - * compile-time warning.
> + * READ_ONCE() and WRITE_ONCE() will fall back to memcpy.
> *
> * Their two major use cases are: (1) Mediating communication between
> * process-level code and irq/NMI handlers, all running on the same CPU,
Conflicts with Konrad's patch in linux-next (from an IngoTree), below.
I'll drop your patch - Konrad covers the same info and more.
(grammar nazi: s/There's/There are/)
commit fed0764fafd8e2e629a033c0f7df4106b0dcb7f0
Author: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
AuthorDate: Mon Jan 25 16:33:20 2016 -0500
Commit: Ingo Molnar <mingo@kernel.org>
CommitDate: Tue Feb 9 14:50:16 2016 +0100
locking/atomics: Update comment about READ_ONCE() and structures
The comment is out of data. Also point out the performance drawback
of the barrier();__builtin_memcpy(); barrier() followed by another
copy from stack (__u) to lvalue;
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Sasha Levin <sasha.levin@oracle.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1453757600-11441-1-git-send-email-konrad.wilk@oracle.com
[ Made it a bit more readable. ]
Signed-off-by: Ingo Molnar <mingo@kernel.org>
diff --git a/include/linux/compiler.h b/include/linux/compiler.h
index 00b042c..4291592 100644
--- a/include/linux/compiler.h
+++ b/include/linux/compiler.h
@@ -263,8 +263,9 @@ static __always_inline void __write_once_size(volatile void *p, void *res, int s
* In contrast to ACCESS_ONCE these two macros will also work on aggregate
* data types like structs or unions. If the size of the accessed data
* type exceeds the word size of the machine (e.g., 32 bits or 64 bits)
- * READ_ONCE() and WRITE_ONCE() will fall back to memcpy and print a
- * compile-time warning.
+ * READ_ONCE() and WRITE_ONCE() will fall back to memcpy(). There's at
+ * least two memcpy()s: one for the __builtin_memcpy() and then one for
+ * the macro doing the copy of variable - '__u' allocated on the stack.
*
* Their two major use cases are: (1) Mediating communication between
* process-level code and irq/NMI handlers, all running on the same CPU,
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web