Memory barrier -- fix sample code
From: Balbir singh <[email protected]>
Date: Tue, 2 Aug 2016 10:26:34 +1000
Subject: [PATCH] Correct a sample in memorybarriers.tex
We probably don't want to show GFP_KERNEL allocation under spin_lock, GFP_ATOMIC seems much better.
---
advsync/memorybarriers.tex | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
advsync/memorybarriers.tex +0 -0
@@ -936,7 +936,7 @@ Then the following code might leak memory!
\begin{verbatim}
spin_lock(&mylock);
if (p == NULL)
- p = kmalloc(sizeof(*p), GFP_KERNEL);
+ p = kmalloc(sizeof(*p), GFP_ATOMIC);
spin_unlock(&mylock);
\end{verbatim}
\end{minipage}
--
2.7.4
Quoted 8 lines · Balbir Singh
From: Balbir singh <[email protected]>
Date: Tue, 2 Aug 2016 10:26:34 +1000
Subject: [PATCH] Correct a sample in memorybarriers.texWe probably don't want to show
GFP_KERNELallocation underspin_lock,GFP_ATOMICseems much better.Signed-off-by Balbir singh <[email protected]>
Good catch, applied, thank you!
However, I had to apply this by hand due to some recent mass changes to figures containing code. Could you please move to current perfbook.git for future submissions?
Thanx, Paul
Quoted 20 lines
---
advsync/memorybarriers.tex | 2 +-1 file changed, 1 insertion(+), 1 deletion(-)advsync/memorybarriers.tex +1
-1@@ -936,7 +936,7 @@ Then the following code might leak memory! \begin{verbatim} spin_lock(&mylock); if (p == NULL) - p = kmalloc(sizeof(*p), GFP_KERNEL); + p = kmalloc(sizeof(*p), GFP_ATOMIC); spin_unlock(&mylock); \end{verbatim} \end{minipage}--
2.7.4
Quoted 10 lines · Paul E. McKenney
Quoted 9 lines · Balbir Singh
From: Balbir singh <[email protected]>
Date: Tue, 2 Aug 2016 10:26:34 +1000
Subject: [PATCH] Correct a sample in memorybarriers.tex
We probably don't want to showGFP_KERNELallocation underspin_lock,GFP_ATOMICseems much better.Signed-off-by Balbir singh <[email protected]>
Quoted 7 lines
Good catch, applied, thank you!
However, I had to apply this by hand due to some recent mass changes to figures containing code. Could you please move to current perfbook.git for future submissions?
Thanx, Paul
I thought I did a git pull before patching.
My git-head pointed to 413b7bc1cf6d65368300e96016ac15ac728b66fd
I'll double check. Thanks for applying it by hand
Balbir Singh.
Quoted 17 lines · Balbir Singh
Quoted 16 lines · Paul E. McKenney
Quoted 9 lines · Balbir Singh
From: Balbir singh <[email protected]>
Date: Tue, 2 Aug 2016 10:26:34 +1000
Subject: [PATCH] Correct a sample in memorybarriers.texWe probably don't want to show
GFP_KERNELallocation underspin_lock,GFP_ATOMICseems much better.Signed-off-by Balbir singh <[email protected]>Good catch, applied, thank you!
However, I had to apply this by hand due to some recent mass changes to figures containing code. Could you please move to current perfbook.git for future submissions?
Quoted 8 lines
Quoted 1 line
Thanx, Paul
I thought I did a git pull before patching.
My git-head pointed to
413b7bc1cf6d65368300e96016ac15ac728b66fdI'll double check. Thanks for applying it by hand
Hi,
Seems like a problem of character encoding.
I see you are using Evolution.
Here is an excerpt from Linux's Documentation/email-clients.txt.
----
Evolution (GUI)
Some people use this successfully for patches.
When composing mail select: Preformat
from Format->Paragraph Style->Preformatted (Ctrl-7) or the toolbar
Then use:
Insert->Text File... (Alt-n x)
to insert the patch.
You can also "diff -Nru old.c new.c | xclip", select Preformat, then paste with the middle button.
----
I hope this helps.
Thanks, Akira
Quoted 6 lines
Balbir Singh.
--
To unsubscribe from this list: send the line "unsubscribe perfbook" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 27 lines · Akira Yokosawa
Quoted 17 lines · Balbir Singh
Quoted 16 lines · Paul E. McKenney
Quoted 9 lines · Balbir Singh
From: Balbir singh <[email protected]>
Date: Tue, 2 Aug 2016 10:26:34 +1000
Subject: [PATCH] Correct a sample in memorybarriers.texWe probably don't want to show
GFP_KERNELallocation underspin_lock,GFP_ATOMICseems much better.Signed-off-by Balbir singh <[email protected]>Good catch, applied, thank you!
However, I had to apply this by hand due to some recent mass changes to figures containing code. Could you please move to current perfbook.git for future submissions?
Quoted 8 lines
Quoted 1 line
Thanx, Paul
I thought I did a git pull before patching.
My git-head pointed to
413b7bc1cf6d65368300e96016ac15ac728b66fdI'll double check. Thanks for applying it by hand
Quoted 7 lines
Hi,
Seems like a problem of character encoding.
I see you are using Evolution.
Here is an excerpt from Linux'sDocumentation/email-clients.txt.
Yes, I do have flow-off and I use an external editor to prevent white space damage. Thanks, I'll double check my editor settings
Balbir