[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 05/12] swiotlb-xen: suppress certain init retries


  • To: Juergen Gross <jgross@xxxxxxxx>, Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 7 Sep 2021 14:05:54 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=NjKaEaYjLVTnjJRE9LIByPoKIietul+QbtKOuyICMWI=; b=Nys53cUyRC4XUlRou/gwDBTvIY3i4CX8U2pwSSON9XCInlyMsBEGQj9YeSpo1MKluf09GQxJvzjxvbtcMCR/Zp6Yl+kOV0hHphSkcwySrlozoJvVq4g/gfQhjj5dC2iY1QgoUgM390KQG3oML5vbCHA4ix95aPI+U0+rLdwEDbspS9ZQleRwtKsDnpQ8sIwq9L8gGtKjY4JJddUn6HcOM+tzifnuOe8MoCUCUOeoDKBHKVtcE46N3yaJ0MKO5gUjXoJQcR3FVD4lqFa0PewzidXcmx9SpVq/M7fk/v1kcq+sMHnLds9ppVZHfI85nlj8boDrfGXDOn4SA2moeAMApg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bNH5CqiSQp2WP6YKX8CS01lPsyYKYZT7W5c0oUP9S5nU8vKEtvfKQLRsQBoz7OMNWFWiz6mObGWAbr6J26UOBx5OrdEebihoh+kiAhdSz/NhDUK7SZS978VbN3Y1l+azXLJqgivXL2N/WcsiWyWH72DqZvj8AD2Xudo4VcPxQyVTsFTkEfN+zTfrjuZNmU/dfeWarcNsjWkjOzDozapymktu+CyTRKajKP4lXanUY2r4CjxTJV4G7XAFcyrhKBPs5zVr+QTyQVMi9yP6Mc7If81xBOqpk6e5kQ7VHiyZ+d0Q8cs1nyqVM9ia3jxcUwikI3uElc6m8bUOftFU6i4uuw==
  • Authentication-results: lists.xenproject.org; dkim=none (message not signed) header.d=none;lists.xenproject.org; dmarc=none action=none header.from=suse.com;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, lkml <linux-kernel@xxxxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 07 Sep 2021 12:06:04 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Only on the 2nd of the paths leading to xen_swiotlb_init()'s "error"
label it is useful to retry the allocation; the first one did already
iterate through all possible order values.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
---
I'm not convinced of the (lack of) indentation of the label, but I made
the new one matzch the existing one.

--- a/drivers/xen/swiotlb-xen.c
+++ b/drivers/xen/swiotlb-xen.c
@@ -184,7 +184,7 @@ retry:
                order--;
        }
        if (!start)
-               goto error;
+               goto exit;
        if (order != get_order(bytes)) {
                pr_warn("Warning: only able to allocate %ld MB for software IO 
TLB\n",
                        (PAGE_SIZE << order) >> 20);
@@ -214,6 +214,7 @@ error:
                pr_info("Lowering to %luMB\n", bytes >> 20);
                goto retry;
        }
+exit:
        pr_err("%s (rc:%d)\n", xen_swiotlb_error(m_ret), rc);
        return rc;
 }




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.