From nobody Thu Apr 25 23:48:04 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1585216040; cv=none; d=zohomail.com; s=zohoarc; b=Ed6Wubc3QMLXREU1cpY3psyFxftMIBVrSw7G6Vk3Mejp9Rw8MtTHTHK/lmX2uOXRZqwqD/9WsCZsaJLYkfCghjJmBAnvtLYeYBqAAH3Fp592neFjmCVfaF7/ATIR2k594HOMe2Tqc9a8TFdSBWS3Xnh08QinpPOsX8I6P5Ccspk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1585216040; h=Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:Message-ID:Sender:Subject:To; bh=S3/aQIl1+mkGYCI82NZFSrbJHJE1Z/811RSNwaI4CZc=; b=Dz5TlU5+b33mjQLrnKhXxnNUIMLDjY9JYJTbx5b+7GF3batYsvTgXJO6FJv4gm27DOOgRq8TH7SoeKmk6ssCu7PGvS8wqG2qYf/hojkj6onoeZXbSgIlVKZPJiZFRN75Pns9jMCjhtppeZxufjjatCkE+KjZjQ3K/Lr9lxYcQ/A= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1585216040114249.93579577569835; Thu, 26 Mar 2020 02:47:20 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jHP5P-000182-UD; Thu, 26 Mar 2020 09:46:03 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jHP5O-00017V-BT for xen-devel@lists.xenproject.org; Thu, 26 Mar 2020 09:46:02 +0000 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 99bd6db2-6f46-11ea-8790-12813bfff9fa; Thu, 26 Mar 2020 09:46:01 +0000 (UTC) Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id E1159AD1E; Thu, 26 Mar 2020 09:45:59 +0000 (UTC) X-Inumbo-ID: 99bd6db2-6f46-11ea-8790-12813bfff9fa X-Virus-Scanned: by amavisd-new at test-mx.suse.de From: Juergen Gross To: xen-devel@lists.xenproject.org Date: Thu, 26 Mar 2020 10:45:57 +0100 Message-Id: <20200326094557.13822-1-jgross@suse.com> X-Mailer: git-send-email 2.16.4 Subject: [Xen-devel] [PATCH] tools/libxl: make default of max event channels dependant on vcpus X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Juergen Gross , Anthony PERARD , Ian Jackson , Wei Liu Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Today the maximum number of event channels for a guest is defaulting to 1023. For large guests with lots of vcpus this is not enough, as e.g. the Linux kernel uses 7 event channels per vcpu, limiting the guest to about 140 vcpus. Instead of requiring to specify the allowed number of event channels via the "event_channels" domain config option, make the default depend on the maximum number of vcpus of the guest. In order not to regress current configs use 1023 as the minimum default setting. Signed-off-by: Juergen Gross --- tools/libxl/libxl_create.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c index e7cb2dbc2b..eddd0e98e5 100644 --- a/tools/libxl/libxl_create.c +++ b/tools/libxl/libxl_create.c @@ -226,7 +226,7 @@ int libxl__domain_build_info_setdefault(libxl__gc *gc, b_info->iomem[i].gfn =3D b_info->iomem[i].start; =20 if (!b_info->event_channels) - b_info->event_channels =3D 1023; + b_info->event_channels =3D min(1023, b_info->max_vcpus * 8 + 255); =20 libxl__arch_domain_build_info_setdefault(gc, b_info); libxl_defbool_setdefault(&b_info->dm_restrict, false); --=20 2.16.4