Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751846AbbD1EaX (ORCPT ); Tue, 28 Apr 2015 00:30:23 -0400 Received: from mail-bl2on0139.outbound.protection.outlook.com ([65.55.169.139]:43193 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750758AbbD1EaV convert rfc822-to-8bit (ORCPT ); Tue, 28 Apr 2015 00:30:21 -0400 Authentication-Results: spf=pass (sender IP is 206.191.229.116) smtp.mailfrom=microsoft.com; redhat.com; dkim=none (message not signed) header.d=none; From: Dexuan Cui To: Vitaly Kuznetsov , KY Srinivasan CC: Haiyang Zhang , "devel@linuxdriverproject.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH v2 0/6] Drivers: hv: vmbus: fair round robin algorithm for vmbus_get_outgoing_channel() Thread-Topic: [PATCH v2 0/6] Drivers: hv: vmbus: fair round robin algorithm for vmbus_get_outgoing_channel() Thread-Index: AQHQgQw5zzR6yZqoq0K9SCTs74Pt0p1h1KDw Date: Tue, 28 Apr 2015 04:30:13 +0000 Message-ID: References: <1430154256-26853-1-git-send-email-vkuznets@redhat.com> In-Reply-To: <1430154256-26853-1-git-send-email-vkuznets@redhat.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [141.251.58.4] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:206.191.229.116;CTRY:US;IPV:NLI;EFV:NLI;BMV:1;SFV:NSPM;SFS:(10019020)(6009001)(438002)(13464003)(41574002)(164054003)(199003)(51704005)(189002)(1511001)(2950100001)(86146001)(6806004)(2656002)(19580405001)(76176999)(86612001)(86362001)(50986999)(87936001)(66066001)(50466002)(5001770100001)(2900100001)(19580395003)(54356999)(33646002)(106466001)(46102003)(106116001)(77156002)(62966003)(47776003)(23726002)(102836002)(97756001)(108616004)(92566002)(46406003)(24736003)(16796002)(4001450100001);DIR:OUT;SFP:1102;SCL:1;SRVR:BL2PR03MB387;H:064-smtp-out.microsoft.com;FPR:;SPF:Pass;MLV:sfv;A:1;MX:1;LANG:en; X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BL2PR03MB387; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(5005006)(5002010)(3002001);SRVR:BL2PR03MB387;BCL:0;PCL:0;RULEID:;SRVR:BL2PR03MB387; X-Forefront-PRVS: 0560A2214D X-OriginatorOrg: microsoft.onmicrosoft.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Apr 2015 04:30:18.3319 (UTC) X-MS-Exchange-CrossTenant-Id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=72f988bf-86f1-41af-91ab-2d7cd011db47;Ip=[206.191.229.116];Helo=[064-smtp-out.microsoft.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL2PR03MB387 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2624 Lines: 67 > -----Original Message----- > From: Vitaly Kuznetsov [mailto:vkuznets@redhat.com] > Sent: Tuesday, April 28, 2015 1:04 > To: KY Srinivasan > Cc: Haiyang Zhang; devel@linuxdriverproject.org; linux- > kernel@vger.kernel.org; Dexuan Cui > Subject: [PATCH v2 0/6] Drivers: hv: vmbus: fair round robin algorithm for > vmbus_get_outgoing_channel() > > Changes in v2: > - Address Dexuan's review comments: > PATCH 3/6: s,channel,primary_channel; > PATCH 4/6: add a forward declaration instead of moving code around; > PATCH 6/6: fix an off-by-one > - Change the algorithm in PATCH 6/6: > Instead of a simple round robin we first try to find a (sub)channel with > the current_cpu == target_cpu and we fallback to a round robin when we > fail > to find one. > > K. Y., Dexuan, can you please give it a spin in various testing environments > you have? Thanks! > > Original description: > > This series is a continuation of the "Drivers: hv: vmbus: Use a round-robin > algorithm for picking the outgoing channel" work. It is supposed to bring > two > significant changes: > 1) Subchannels for a channel are distributed evenly across all vcpus we have. > Currently we try to distribute all channels (including subchannels) across > all vcpus, this approach doesn't guarantee that the particular channel's > subchannels will be distributed in the same way as we process all offer > requests in some random order. (Patch 05) > 2) Channel picking based on the current vcpu is dropped from > vmbus_get_outgoing_channel() in favor of a fair round robin. (Patch 06) > (this > is not true anymore, see 'Changes'). > > Patches 01 - 04 are cleanup/refactoring. > > Vitaly Kuznetsov (6): > Drivers: hv: vmbus: unify calls to percpu_channel_enq() > Drivers: hv: vmbus: briefly comment num_sc and next_oc > Drivers: hv: vmbus: decrease num_sc on subchannel removal > Drivers: hv: vmbus: move init_vp_index() call to vmbus_process_offer() > Drivers: hv: vmbus: distribute subchannels among all vcpus > Drivers: hv: vmbus: improve selection of an outgoing channel > > drivers/hv/channel_mgmt.c | 127 ++++++++++++++++++++++++++--------- > ----------- > include/linux/hyperv.h | 12 +++-- > 2 files changed, 80 insertions(+), 59 deletions(-) > > -- Patch 1, 2 and 3 are good to me. We'll have to test 4~6 for performance change. Thanks, -- Dexuan -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/