> for (i = RCU_WAIT_TAIL i if (rdp->nxttail != rdp->nxttail & > return 1 /* Yes, this CPU has newly registered callbacks. > + if (((struct callback_head *)rdp->nxttail)->func) > return 0 /* No, this is a no-CBs (or offline) CPU. > return 1 /* Yes, a no-CBs CPU needs one. > -324,7 +324,7 cpu_needs_another_gp(struct rcu_state *rsp, struct rcu_data *rdp) > diff -git a/kernel/rcu/tree.c b/kernel/rcu/tree.c > 1 file changed, 1 insertion(+), 1 deletion(-) Scheduler starts running.) What kernel configuration are you using? So *rdp->nxttail will be non-NULL in this case,Īlso, what version of the kernel are you using? Are you posting callbacksĭuring early boot? (Such callbacks won't be invoked until after the O rdp->nxttail = &rdp->nxtlist->nextĪnd in this case, rdp->nxtlist will reference the first callback. >From what I can see, if there is exactly one newly queued callback, we will > rather than the "next" field of the callback_head.Įxactly what did you do to test the problem and verify your fix? > Fix this by performing this check on the "func" field > cause undesirable effects like boot up delay upto 300 > waiting until a second call_back gets queued, which can > return false even though we need a grace period to This in turn causes cpu_needs_another_gp() to > out to be if(NULL) in case there is a single callback > to the first element, the if condition will just turn > in the function cpu_needs_another_gp(), essentially > the zeroeth element of struct callback_head. > In case of a single callback queued in the nxttail, > void (*func)(struct callback_head *head) > Callback is represented via struct callback_head > on the nxttail of the per-cpu RCU data structure. > When we queue a callback for RCU, it goes and sits Mohammed Khajapasha, Vignesh Radhakrishnan McKenney 15:07 UTC ( / raw)Ĭc: josh, rostedt, snoyers, laijs, linux-kernel, kaushalk, 12:13 ` kishank 0 siblings, 1 reply 11+ messages in threadįrom: Paul E. 13:48 rcu: Start grace period even for single callback Kishan 15:07 ` Paul E. * Re: rcu: Start grace period even for single callback ^ raw reply related 11+ messages in thread is a member of the Code Aurora Forum, hosted by The Linux Foundation. QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. */įor (i = RCU_WAIT_TAIL i nxttail != rdp->nxttail & Return 1 /* Yes, this CPU has newly registered callbacks. + if (((struct callback_head *)rdp->nxttail)->func) Return 0 /* No, this is a no-CBs (or offline) CPU. +++ -324,7 +324,7 cpu_needs_another_gp(struct rcu_state *rsp, struct rcu_data *rdp) Rather than the "next" field of the callback_head.ġ file changed, 1 insertion(+), 1 deletion(-)ĭiff -git a/kernel/rcu/tree.c b/kernel/rcu/tree.c Waiting until a second call_back gets queued, which canĬause undesirable effects like boot up delay upto 300įix this by performing this check on the "func" field Return false even though we need a grace period to Out to be if(NULL) in case there is a single callback To the first element, the if condition will just turn In the function cpu_needs_another_gp(), essentially The zeroeth element of struct callback_head. In case of a single callback queued in the nxttail, Void (*func)(struct callback_head *head) On the nxttail of the per-cpu RCU data structure.Ĭallback is represented via struct callback_head When we queue a callback for RCU, it goes and sits To: paulmck, josh, rostedt, snoyers, laijs, linux-kernel, kaushalkĬc: Kishan Kumar, Mohammed Khajapasha, Vignesh Radhakrishnan McKenney 0 siblings, 1 reply 11+ messages in thread Rcu: Start grace period even for single callback archive mirror help / color / mirror / Atom feed * rcu: Start grace period even for single callback 13:48 Kishan Kumar
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |