Received: by 10.223.164.202 with SMTP id h10csp216620wrb; Mon, 13 Nov 2017 05:25:54 -0800 (PST) X-Google-Smtp-Source: AGs4zMb5K1tROJwXEM60A51Is38+W5+iRYfCryObW8HN6lbReBUEGL4DuzFTtPHJY1q2JsCwQZDS X-Received: by 10.99.109.5 with SMTP id i5mr5776973pgc.359.1510579554442; Mon, 13 Nov 2017 05:25:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510579554; cv=none; d=google.com; s=arc-20160816; b=rGRx6eWFcAcJmDL2AdFloORKQVZ3O4F8TL4X2+xRM9dZ+WGOVapKGfSxKwngevwzGt 4gB3pMgIGmXhbV+ENcfZ7XvRaXWF1F9poW0EcfSi25CU54EEL7C8wpCvhvP4bZkSpCZ6 yqRILWzjuI3IfBH/RodsD1SJFSr1Na/YJaw9zh/TX1oeGrbaj1R6sfkjaL3RSHTG3EXE FWTaKr76GBro627HXGlOgMJPWVxx/XpZUM9n1zezqUDupLmDeEgOzUxuLeZVcZfAbAIW CKOoxP7HWS7+czQ+SJoM5eR9vLsBnZtgbmmXK0snhLRj5MGBJhdcW8YiNWcqKY7WPrpL kBmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=o5tIPFcczk6TJVsN7Uj2mzXIUfBNBUcVh01RLqhp8I8=; b=DrlnwD+xiUI1wfKD3vzIRnrEMRirzliSNHUjOZoNfXGSJeGFFV81wn3uGeV+lb4qzw ddyNkl3+L6/WnQ3FUZrbmKZPfW4m3Pd+dAFeAYWYJXT2fGL6nPzjCvkujHcdbHg9sjrN CuUuWYnenl7UeJMlOxnqNs8wUbxkT3TndeRcoWBgBGI22ZtXerEzVaMY58b/D8ehxqoZ sNgK1bvWTA/T+c0ezOPoRSrdiW49xvtRHBtDzxQjgjSVvp0RPVqtNMrLrN9/gNUgzrYC fWqtRLhbPOARFvbjvjVB5dBsNapEl0mVQB4jC1VvkfZdICuJIQIJsIvSrUctoiCV7pNN PMSQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f6si13493357pgo.449.2017.11.13.05.25.41; Mon, 13 Nov 2017 05:25:54 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754554AbdKMNX7 (ORCPT + 95 others); Mon, 13 Nov 2017 08:23:59 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:50052 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753487AbdKMNAs (ORCPT ); Mon, 13 Nov 2017 08:00:48 -0500 Received: from localhost (LFbn-1-12253-150.w90-92.abo.wanadoo.fr [90.92.67.150]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 69735AA5; Mon, 13 Nov 2017 13:00:47 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Juergen Gross , Boris Ostrovsky , Sasha Levin Subject: [PATCH 4.9 05/87] xen/netback: set default upper limit of tx/rx queues to 8 Date: Mon, 13 Nov 2017 13:55:22 +0100 Message-Id: <20171113125615.814341564@linuxfoundation.org> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20171113125615.304035578@linuxfoundation.org> References: <20171113125615.304035578@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Juergen Gross [ Upstream commit 56dd5af9bc23d0d5d23bb207c477715b4c2216c5 ] The default for the maximum number of tx/rx queues of one interface is the number of cpus of the system today. As each queue pair reserves 512 grant pages this default consumes a ridiculous number of grants for large guests. Limit the queue number to 8 as default. This value can be modified via a module parameter if required. Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Signed-off-by: Boris Ostrovsky Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/net/xen-netback/netback.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) --- a/drivers/net/xen-netback/netback.c +++ b/drivers/net/xen-netback/netback.c @@ -67,6 +67,7 @@ module_param(rx_drain_timeout_msecs, uin unsigned int rx_stall_timeout_msecs = 60000; module_param(rx_stall_timeout_msecs, uint, 0444); +#define MAX_QUEUES_DEFAULT 8 unsigned int xenvif_max_queues; module_param_named(max_queues, xenvif_max_queues, uint, 0644); MODULE_PARM_DESC(max_queues, @@ -1626,11 +1627,12 @@ static int __init netback_init(void) if (!xen_domain()) return -ENODEV; - /* Allow as many queues as there are CPUs if user has not + /* Allow as many queues as there are CPUs but max. 8 if user has not * specified a value. */ if (xenvif_max_queues == 0) - xenvif_max_queues = num_online_cpus(); + xenvif_max_queues = min_t(unsigned int, MAX_QUEUES_DEFAULT, + num_online_cpus()); if (fatal_skb_slots < XEN_NETBK_LEGACY_SLOTS_MAX) { pr_info("fatal_skb_slots too small (%d), bump it to XEN_NETBK_LEGACY_SLOTS_MAX (%d)\n", From 1583356918422662691@xxx Mon Nov 06 22:20:26 +0000 2017 X-GM-THRID: 1583356918422662691 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread