2019-03-29 09:58:21

by Neeraj Upadhyay

[permalink] [raw]
Subject: [PATCH] rcu: tree_plugin: Dump specified number of blocked tasks

dump_blkd_tasks() uses 10 as the max number of blocked
tasks, which are printed. However, it has an argument
which provides that number. So, use the argument value
instead. As all callers currently pass 10 as the number,
there isn't any impact.

Signed-off-by: Neeraj Upadhyay <[email protected]>
---
kernel/rcu/tree_plugin.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
index 3960294..08bcd87 100644
--- a/kernel/rcu/tree_plugin.h
+++ b/kernel/rcu/tree_plugin.h
@@ -740,7 +740,7 @@ void exit_rcu(void)
i = 0;
list_for_each(lhp, &rnp->blkd_tasks) {
pr_cont(" %p", lhp);
- if (++i >= 10)
+ if (++i >= ncheck)
break;
}
pr_cont("\n");
--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a
member of the Code Aurora Forum, hosted by The Linux Foundation



2019-03-29 10:14:01

by Mukesh Ojha

[permalink] [raw]
Subject: Re: [PATCH] rcu: tree_plugin: Dump specified number of blocked tasks


On 3/29/2019 3:25 PM, Neeraj Upadhyay wrote:
> dump_blkd_tasks() uses 10 as the max number of blocked
> tasks, which are printed. However, it has an argument
> which provides that number. So, use the argument value
> instead. As all callers currently pass 10 as the number,
> there isn't any impact.
>
> Signed-off-by: Neeraj Upadhyay <[email protected]>

Looks good to me.

Reviewed-by: Mukesh Ojha <[email protected]>

Cheers,
-Mukesh

> ---
> kernel/rcu/tree_plugin.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
> index 3960294..08bcd87 100644
> --- a/kernel/rcu/tree_plugin.h
> +++ b/kernel/rcu/tree_plugin.h
> @@ -740,7 +740,7 @@ void exit_rcu(void)
> i = 0;
> list_for_each(lhp, &rnp->blkd_tasks) {
> pr_cont(" %p", lhp);
> - if (++i >= 10)
> + if (++i >= ncheck)
> break;
> }
> pr_cont("\n");

2019-03-29 21:28:03

by Paul E. McKenney

[permalink] [raw]
Subject: Re: [PATCH] rcu: tree_plugin: Dump specified number of blocked tasks

On Fri, Mar 29, 2019 at 03:42:44PM +0530, Mukesh Ojha wrote:
>
> On 3/29/2019 3:25 PM, Neeraj Upadhyay wrote:
> >dump_blkd_tasks() uses 10 as the max number of blocked
> >tasks, which are printed. However, it has an argument
> >which provides that number. So, use the argument value
> >instead. As all callers currently pass 10 as the number,
> >there isn't any impact.
> >
> >Signed-off-by: Neeraj Upadhyay <[email protected]>
>
> Looks good to me.
>
> Reviewed-by: Mukesh Ojha <[email protected]>

Applied, thank you both!

Thanx, Paul

> Cheers,
> -Mukesh
>
> >---
> > kernel/rcu/tree_plugin.h | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> >diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
> >index 3960294..08bcd87 100644
> >--- a/kernel/rcu/tree_plugin.h
> >+++ b/kernel/rcu/tree_plugin.h
> >@@ -740,7 +740,7 @@ void exit_rcu(void)
> > i = 0;
> > list_for_each(lhp, &rnp->blkd_tasks) {
> > pr_cont(" %p", lhp);
> >- if (++i >= 10)
> >+ if (++i >= ncheck)
> > break;
> > }
> > pr_cont("\n");
>