xen/sched: remove pointless ASSERT() in credit2
PATCH 1/1 xen/sched: remove pointless ASSERT() in credit2
The ASSERT() at the top of csched2_context_saved() is completely pointless, as the BUG_ON() just in front of it catches the same problem already.
While at it remove a bogus space in the BUG_ON().
--- xen/common/sched/credit2.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
xen/common/sched/credit2.c +2 -4
@@ -2167,10 +2167,8 @@ csched2_context_saved(const struct scheduler *ops, struct sched_unit *unit)s_time_t now =NOW ();LIST_HEAD (were_parked); -BUG_ON ( !is_idle_unit (unit) && - svc->rqd !=c2rqd (ops,sched_unit_master (unit))); -ASSERT (is_idle_unit (unit) || - svc->rqd ==c2rqd (ops,sched_unit_master (unit))); +BUG_ON (!is_idle_unit (unit) && + svc->rqd !=c2rqd (ops,sched_unit_master (unit)));/* This unit is now eligible to be put on the runqueue again */ __clear_bit (__CSFLAG_scheduled, &svc->flags);
Signature · 7 lines
2.16.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 5 lines · Juergen Gross
The
ASSERT()at the top ofcsched2_context_saved()is completely pointless, as theBUG_ON()just in front of it catches the same problem
already.
Yep, I went double checking and this is my fault. :-(
Apparently, in ccf2ead7f52 ("xen: credit2: make the code less experimental"), for this specific case, I added the assert but forgot to remove the BUG_ON().
Thanks for noticing and acting on this. :-)
TBH, though, considering the nature of the check, I'd rather keep the ASSERT() and kill the BUG_ON().
I can do the patch myself if you don't want to respin it that way.
Thanks again and Regards
Signature · 6 lines
Dario Faggioli, Ph.D http://about.me/dario.faggioli Virtualization Software Engineer SUSE Labs, SUSE https://www.suse.com/ ------------------------------------------------------------------- <<This happens because _I_ choose it to happen!>> (Raistlin Majere)
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 12 lines · Dario Faggioli
Quoted 5 lines · Juergen Gross
The
ASSERT()at the top ofcsched2_context_saved()is completely pointless, as theBUG_ON()just in front of it catches the same problem
already.Yep, I went double checking and this is my fault. :-(
Apparently, in
ccf2ead7f52("xen: credit2: make the code less experimental"), for this specific case, I added the assert but forgot to remove theBUG_ON().
Quoted 6 lines
Thanks for noticing and acting on this. :-)
TBH, though, considering the nature of the check, I'd rather keep the
ASSERT()and kill theBUG_ON().I can do the patch myself if you don't want to respin it that way.
I'll respin.
Juergen
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 10 lines · Jürgen Groß
Quoted 6 lines · Dario Faggioli
TBH, though, considering the nature of the check, I'd rather keep the
ASSERT()and kill theBUG_ON().I can do the patch myself if you don't want to respin it that way.
I'll respin.
Thanks!
On an not so related note... I have that other patch of yours, the one about Credit2 runqueues on my list.
Sorry it's taking a while to review it properly. I'll try to get to it ASAP.
Regards
Signature · 6 lines
Dario Faggioli, Ph.D http://about.me/dario.faggioli Virtualization Software Engineer SUSE Labs, SUSE https://www.suse.com/ ------------------------------------------------------------------- <<This happens because _I_ choose it to happen!>> (Raistlin Majere)
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel