* [PATCH] smp: Remove CSD_FLAG_WAIT flag that's unused
@ 2015-02-27 20:36 Tim Chen
2015-02-27 22:09 ` Peter Zijlstra
0 siblings, 1 reply; 2+ messages in thread
From: Tim Chen @ 2015-02-27 20:36 UTC (permalink / raw)
To: Peter Zijlstra, Andrew Morton
Cc: Ingo Molnar, Andi Kleen, H. Peter Anvin, Thomas Gleixner,
Srivatsa S.Bhat, linux-kernel
The CSD_FLAG_WAIT is not serving any useful purpose as we do not use
its value to decide if we are going to wait for a smp call to complete.
We also never cleared it properly when we are done waiting to indicate
that the wait is over. So the WARNING debug check in csd_unlock is
also not serving useful purpose. Propose here to remove it to clean up
the code.
Thanks.
Tim
Signed-off-by: Tim Chen <tim.c.chen@linux.intel.com>
---
kernel/smp.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/kernel/smp.c b/kernel/smp.c
index f38a1e6..b65420d 100644
--- a/kernel/smp.c
+++ b/kernel/smp.c
@@ -19,7 +19,6 @@
enum {
CSD_FLAG_LOCK = 0x01,
- CSD_FLAG_WAIT = 0x02,
};
struct call_function_data {
@@ -126,7 +125,7 @@ static void csd_lock(struct call_single_data *csd)
static void csd_unlock(struct call_single_data *csd)
{
- WARN_ON((csd->flags & CSD_FLAG_WAIT) && !(csd->flags & CSD_FLAG_LOCK));
+ WARN_ON(!(csd->flags & CSD_FLAG_LOCK));
/*
* ensure we're all done before releasing data:
@@ -173,9 +172,6 @@ static int generic_exec_single(int cpu, struct call_single_data *csd,
csd->func = func;
csd->info = info;
- if (wait)
- csd->flags |= CSD_FLAG_WAIT;
-
/*
* The list addition should be visible before sending the IPI
* handler locks the list to pull the entry off it because of
--
1.9.3
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] smp: Remove CSD_FLAG_WAIT flag that's unused
2015-02-27 20:36 [PATCH] smp: Remove CSD_FLAG_WAIT flag that's unused Tim Chen
@ 2015-02-27 22:09 ` Peter Zijlstra
0 siblings, 0 replies; 2+ messages in thread
From: Peter Zijlstra @ 2015-02-27 22:09 UTC (permalink / raw)
To: Tim Chen
Cc: Andrew Morton, Ingo Molnar, Andi Kleen, H. Peter Anvin,
Thomas Gleixner, Srivatsa S.Bhat, linux-kernel
On Fri, Feb 27, 2015 at 12:36:13PM -0800, Tim Chen wrote:
>
> The CSD_FLAG_WAIT is not serving any useful purpose as we do not use
> its value to decide if we are going to wait for a smp call to complete.
> We also never cleared it properly when we are done waiting to indicate
> that the wait is over. So the WARNING debug check in csd_unlock is
> also not serving useful purpose. Propose here to remove it to clean up
> the code.
Linus had a much more comprehensive patch:
http://marc.info/?l=linux-kernel&m=142368734118230
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-02-27 22:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-27 20:36 [PATCH] smp: Remove CSD_FLAG_WAIT flag that's unused Tim Chen
2015-02-27 22:09 ` Peter Zijlstra
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome