mm: ensure useful progress in decrease_reservation

During my fun time playing with balloon driver I found that hypervisor's
preemption check kept decrease_reservation from doing any useful work
for 32 bit guests, resulting in hanging the guests.

As Andrew suggested, we can force the check to fail for the first
iteration to ensure progress. We did this in d3a55d7d9 "x86/mm: Ensure
useful progress in alloc_l2_table()" already.

After this change I cannot see the hang caused by continuation logic
anymore.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Keir Fraser <keir@xen.org>
This commit is contained in:
Wei Liu authored and Jan Beulich committed 2014-02-28 17:35:15 +01:00
1 parent e0fabe8e81
commit 79de2d31f1
1 file changed
+1 -1
+1 -1
View File
@@ -268,7 +268,7 @@ static void decrease_reservation(struct memop_args *a)
for ( i = a->nr_done; i < a->nr_extents; i++ )
{
if ( hypercall_preempt_check() )
if ( hypercall_preempt_check() && i != a->nr_done )
{
a->preempted = 1;
goto out;
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.