From patchwork Tue Sep 7 12:05:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 12478445 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 23AF1C433F5 for ; Tue, 7 Sep 2021 12:06:13 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C263160238 for ; Tue, 7 Sep 2021 12:06:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org C263160238 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.180921.327810 (Exim 4.92) (envelope-from ) id 1mNZrY-0006C9-27; Tue, 07 Sep 2021 12:06:04 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 180921.327810; Tue, 07 Sep 2021 12:06:04 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mNZrX-0006C0-V9; Tue, 07 Sep 2021 12:06:03 +0000 Received: by outflank-mailman (input) for mailman id 180921; Tue, 07 Sep 2021 12:06:02 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mNZrW-0006BD-A7 for xen-devel@lists.xenproject.org; Tue, 07 Sep 2021 12:06:02 +0000 Received: from de-smtp-delivery-102.mimecast.com (unknown [194.104.111.102]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id a7f0c699-b15d-4fbb-909d-2d8db2c1a257; Tue, 07 Sep 2021 12:06:01 +0000 (UTC) Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01lp2059.outbound.protection.outlook.com [104.47.0.59]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-2-5mGp0lRPMUSPJGnZU8v3Vg-1; Tue, 07 Sep 2021 14:05:59 +0200 Received: from VI1PR04MB5600.eurprd04.prod.outlook.com (2603:10a6:803:e7::16) by VI1PR0401MB2335.eurprd04.prod.outlook.com (2603:10a6:800:2e::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4478.19; Tue, 7 Sep 2021 12:05:56 +0000 Received: from VI1PR04MB5600.eurprd04.prod.outlook.com ([fe80::4d37:ec64:4e90:b16b]) by VI1PR04MB5600.eurprd04.prod.outlook.com ([fe80::4d37:ec64:4e90:b16b%7]) with mapi id 15.20.4500.014; Tue, 7 Sep 2021 12:05:56 +0000 Received: from [10.156.60.236] (37.24.206.209) by AM4P190CA0023.EURP190.PROD.OUTLOOK.COM (2603:10a6:200:56::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4478.19 via Frontend Transport; Tue, 7 Sep 2021 12:05:55 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: a7f0c699-b15d-4fbb-909d-2d8db2c1a257 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1631016360; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NjKaEaYjLVTnjJRE9LIByPoKIietul+QbtKOuyICMWI=; b=cUwoMCB0JoLefXLknZuXXBQIJi2/XEdAFclZm/Zcllba9pufqDSwOkqt7B6Z6tDzIFr9Wo lY8bLPEjAe8CE6xWUSU8qbz1dTLBNvcB7o7MgOAiwK40kEPiH7dRZ48efHrTxDjmoJBBrt NrUWPAdnctsWyXyBt+auDKifvhMtPbQ= X-MC-Unique: 5mGp0lRPMUSPJGnZU8v3Vg-1 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== 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-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 Authentication-Results: lists.xenproject.org; dkim=none (message not signed) header.d=none;lists.xenproject.org; dmarc=none action=none header.from=suse.com; Subject: [PATCH 05/12] swiotlb-xen: suppress certain init retries From: Jan Beulich To: Juergen Gross , Boris Ostrovsky Cc: Stefano Stabellini , lkml , "xen-devel@lists.xenproject.org" References: <588b3e6d-2682-160c-468e-44ca4867a570@suse.com> Message-ID: <56477481-87da-4962-9661-5e1b277efde0@suse.com> Date: Tue, 7 Sep 2021 14:05:54 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 In-Reply-To: <588b3e6d-2682-160c-468e-44ca4867a570@suse.com> Content-Language: en-US X-ClientProxiedBy: AM4P190CA0023.EURP190.PROD.OUTLOOK.COM (2603:10a6:200:56::33) To VI1PR04MB5600.eurprd04.prod.outlook.com (2603:10a6:803:e7::16) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f04244bf-cb78-4275-9e76-08d971f7d90e X-MS-TrafficTypeDiagnostic: VI1PR0401MB2335: X-LD-Processed: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba,ExtFwd X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7691; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +XXOKh8+bG+9GNKJSyR8gXikRgeL++Ny28srIttNOVOeijUGZBfzPwMh+z0MLJBFgQQ7kgTuADnedHnaBZL5ahrRWrzf3Wp2r1paBEBVQutU9HOHLX6S/e6DBWJWKyrRPM5KFUY7ihst2GiruxreH0bHM9VWvZUM4QT+asbyJtaRUWZHNNSgrP3IYAEQVjVbUBXWUs4QyNLEU9OhF8i7fuUtQYK2ULLbpG95a0oAaow87Q1aeS1BmXDCB7CYwRN/tpT0fxYGN0jN/HiZ0EZqjF3F9k0PPacX7myFAglxZPcq7/mo7r1sdKTj9XgAHnaSoXewSUYkJOsxf7v184X+uJEhg2j5fNYsLxkBqhmMwpYvt5Xu1O07KxQn5imA6LAIFlQlNvcUqdF1HuPeJ3uZuEqP/VwIVi4glJ8kieRBKFxRxFohcLd/BUhkwE84aQ/AFy6gaAVWAniYnVhRAzvMLbbgLZLuNri2iGsf+pLcuLiXWtR3946qFQKidWdrjv/eD5SAyOCe8ihKlpLQR9cf8Mntt3ktVG7aOK+fH+AURt7gb2KNbFiUFGUEobDyDufRv0pUMbgQHa6sVfZtw7ZkjHQrlqLkn74guDwBDxjsJRn98l850b6F1Cghc9y4XmYCMuEmR+1qAMQPIMTJA+m7d/ANDqXy5tv447enrN1fn65Cdx+jZ1iyIPBOE8TXD3Q/ybzo/UbI11Yog7LitPVnhOtvoFcZtxEiNpmGCzPfnzE= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR04MB5600.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(39860400002)(376002)(366004)(136003)(396003)(346002)(2616005)(8676002)(5660300002)(38100700002)(54906003)(110136005)(83380400001)(956004)(66476007)(66556008)(66946007)(4744005)(26005)(316002)(6486002)(31686004)(8936002)(16576012)(36756003)(4326008)(2906002)(478600001)(186003)(86362001)(31696002)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?EbQ7L2tYDn46Okr8jANN0BpD8G8v?= =?utf-8?q?PmO22gujkK3T8w86srMkUjoNIMUqOml+II/7oLxPtZEo5H52qNsoUcev0gcWQYg2u?= =?utf-8?q?rfuFpgGYRMca6+pCzzsHoFRGNpe+bSWH9VxNilhezwrSRIWcCsY1/LH8uc9pDZPBF?= =?utf-8?q?iSfgOlHKO5risHyef3cMF/VFt7mBRPhjdGp3sKGmly2M4CJactrA7oH3EL0dwdOdW?= =?utf-8?q?ZDnKXT2gxPqB3pnFKGq3K3C8P+7iKRqhDqr5wIXhJTHkg0Q28vX6cWNhXeDXBkp+e?= =?utf-8?q?kWEguG/xm07nUNfs/6ZW42soRbq9/TUiNTt/g/TzO1IvXUGPhpSv+Wtfcm7HWpYM2?= =?utf-8?q?Ihx9ERFR8e9dgG9oq3e9kxgfw9grVEo40TFynYufxHYHg45GQuHAzHErLYd3MyJsD?= =?utf-8?q?z9ELy5Aa4Sxv5znlbL0WNbG9p9WSCBFD65JRazC0o1VxC7HNPSD85PtqpzF59zAdw?= =?utf-8?q?m97goC3Ok51TWfafXpdne6hC7rguQFciEzRFmn+DYkhYllTot4g9eim5XsRx2ls2n?= =?utf-8?q?NW7qpM7+odpE/cAApiHF0YrD2VOv0cCp9KY0KV97IjtQ8D4Lso/n5T3qsaI81JtCA?= =?utf-8?q?L+KK0GT774iIN3ZO72Y2kPuGtuwvIuNpCG/WTGdCXdHCyposm27R4RD8m/T3Fdc1E?= =?utf-8?q?f5w5cqmpiUWtb/B5aaMnOIM0wEKngWXGziss4Kpph7axbFG6+6NflYxokOBxXfulC?= =?utf-8?q?pFGtIafNOM2rfplCDWkNnmQRTj6L1m7Kru6L8Vj3RaenuQjNxrk3sDbkCIaFZKjRo?= =?utf-8?q?3ES/WxlYUiEAcF6UQArB+U4pcQGbhMfqSLHr6jKp/RJ3PSn894b6t6LkFkakHa6OI?= =?utf-8?q?x409JsYMXplra6a0f8NvWK0VpuGz295yePvs76HXnsIFIO+Qv7gPwbPGf3jZSbkpn?= =?utf-8?q?cpBheis/gPZ0OT5IkcVdp9/k/cZXeWDr+STFsO4GDygTb3kA7mC7pzeduRgdHlwsR?= =?utf-8?q?eWZoqH8pnhhF7g+0r/e6X/xwIFQeWGfoqZvKpTONqRodCO0I0CMl4WnU4Wes3vvU8?= =?utf-8?q?9nnFBMDTD3AW9oJhG4x8+9/X6IBBQNeX5h41t+LdoyYS3TeWaZaqFYdaZx6LFreow?= =?utf-8?q?c379FZuD6j45LJ95PGea46IRlS13duCXfsPVL2QXExErv0gWOGq97rRldm4CO/jxi?= =?utf-8?q?VHV3TLN65IOMrs5NsCaKYyxtq3l+A25t3cpOTwo4tg/xKTenoU13heTw25Tmdm5Io?= =?utf-8?q?E3L47UjuuDt5WMj2V1qPHSPKrAhht9mnph0qYa8aDPI3Wn8j4IwfjvVvww4WJllM1?= =?utf-8?q?ljpGL55qNYjwmzUi?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: f04244bf-cb78-4275-9e76-08d971f7d90e X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5600.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Sep 2021 12:05:56.3159 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: aanrS8Dgx2smsMpI0qTYptKbqhrbXgSx90Dq+sCf5bekkXCEYkwfljdlYZqNb2Whgr2xX0DrgEcWMDg0QGCsiA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0401MB2335 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 Reviewed-by: Christoph Hellwig Reviewed-by: Stefano Stabellini --- 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; }