From: Xie XiuQi <xiexiuqi@huawei.com>
To: Jiang Liu <liuj97@gmail.com>, Jiang Liu <jiang.liu@huawei.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Shaohua Li <shli@kernel.org>, Wang YanQing <udknight@gmail.com>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Ingo Molnar <mingo@elte.hu>, Steven Rostedt <rostedt@goodmis.org>,
Paul Gortmaker <paul.gortmaker@windriver.com>,
liguang <lig.fnst@cn.fujitsu.com>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v1 2/3] SMP: simpilify function generic_smp_call_function_single_interrupt()
Date: Mon, 9 Sep 2013 10:08:02 +0800 [thread overview]
Message-ID: <522D2D82.2070604@huawei.com> (raw)
In-Reply-To: <1378653745-8343-2-git-send-email-liuj97@gmail.com>
On 2013/9/8 23:22, Jiang Liu wrote:
> From: Jiang Liu <jiang.liu@huawei.com>
>
> Now the call_single_data data structure is always locked by invoking
> csd_lock() before inserting it into corresponding call_single_queue
> list, so no need to save and check csd->flags in function
> generic_smp_call_function_single_interrupt().
>
> Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
> Cc: Jiang Liu <liuj97@gmail.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Wang YanQing <udknight@gmail.com>
> Cc: Shaohua Li <shli@kernel.org>
> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
> Cc: Ingo Molnar <mingo@elte.hu>
> Cc: Steven Rostedt <rostedt@goodmis.org>
> Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
> Cc: liguang <lig.fnst@cn.fujitsu.com>
> Cc: linux-kernel@vger.kernel.org
Hi, I've sent a same patch before and it has been applied by Ingo.
See http://git.kernel.org/cgit/linux/kernel/git/tip/tip.git/commit/?id=46591962cb5bfd2bfb0baf42497119c816503598
> ---
> kernel/smp.c | 16 +---------------
> 1 file changed, 1 insertion(+), 15 deletions(-)
>
> diff --git a/kernel/smp.c b/kernel/smp.c
> index a034712..baa2a65 100644
> --- a/kernel/smp.c
> +++ b/kernel/smp.c
> @@ -181,25 +181,11 @@ void generic_smp_call_function_single_interrupt(void)
>
> while (!list_empty(&list)) {
> struct call_single_data *csd;
> - unsigned int csd_flags;
>
> csd = list_entry(list.next, struct call_single_data, list);
> list_del(&csd->list);
> -
> - /*
> - * 'csd' can be invalid after this call if flags == 0
> - * (when called through generic_exec_single()),
> - * so save them away before making the call:
> - */
> - csd_flags = csd->flags;
> -
> csd->func(csd->info);
> -
> - /*
> - * Unlocked CSDs are valid through generic_exec_single():
> - */
> - if (csd_flags & CSD_FLAG_LOCK)
> - csd_unlock(csd);
> + csd_unlock(csd);
> }
> }
>
>
next prev parent reply other threads:[~2013-09-09 2:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-08 15:22 [PATCH v1 1/3] SMP: kill redundant call_function_data->cpumask_ipi field Jiang Liu
2013-09-08 15:22 ` [PATCH v1 2/3] SMP: simpilify function generic_smp_call_function_single_interrupt() Jiang Liu
2013-09-09 2:08 ` Xie XiuQi [this message]
2013-09-08 15:22 ` [PATCH v1 3/3] SMP, trivial: remove unused code from smp_boot.h Jiang Liu
2013-09-10 2:32 ` [PATCH v1 1/3] SMP: kill redundant call_function_data->cpumask_ipi field Wang YanQing
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=522D2D82.2070604@huawei.com \
--to=xiexiuqi@huawei.com \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=jiang.liu@huawei.com \
--cc=lig.fnst@cn.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=liuj97@gmail.com \
--cc=mingo@elte.hu \
--cc=paul.gortmaker@windriver.com \
--cc=rostedt@goodmis.org \
--cc=shli@kernel.org \
--cc=udknight@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox