[Xen-devel] [PATCH v2] xen/sched: remove pointless BUG_ON() in credit2

Juergen Gross posted 1 patch 6 days ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/xen tags/patchew/20200211094418.7500-1-jgross@suse.com
xen/common/sched/credit2.c | 2 --
1 file changed, 2 deletions(-)

[Xen-devel] [PATCH v2] xen/sched: remove pointless BUG_ON() in credit2

Posted by Juergen Gross 6 days ago
The BUG_ON() at the top of csched2_context_saved() is completely
pointless, as the ASSERT() just following it catches the same problem
already.

Signed-off-by: Juergen Gross <jgross@suse.com>
---
 xen/common/sched/credit2.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/xen/common/sched/credit2.c b/xen/common/sched/credit2.c
index b965cd1c7b..7d104f15d0 100644
--- a/xen/common/sched/credit2.c
+++ b/xen/common/sched/credit2.c
@@ -2167,8 +2167,6 @@ 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)));
 
-- 
2.16.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH v2] xen/sched: remove pointless BUG_ON() in credit2

Posted by Dario Faggioli 6 days ago
On Tue, 2020-02-11 at 10:44 +0100, Juergen Gross wrote:
> The BUG_ON() at the top of csched2_context_saved() is completely
> pointless, as the ASSERT() just following it catches the same problem
> already.
> 
> Signed-off-by: Juergen Gross <jgross@suse.com>
>
Reviewed-by: Dario Faggioli <dfaggioli@suse.com>

Thanks and Regards
-- 
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
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel