Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754793AbbBPJBQ (ORCPT ); Mon, 16 Feb 2015 04:01:16 -0500 Received: from mail-bl2on0103.outbound.protection.outlook.com ([65.55.169.103]:65394 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751797AbbBPJBP convert rfc822-to-8bit (ORCPT ); Mon, 16 Feb 2015 04:01:15 -0500 From: Dexuan Cui To: KY Srinivasan , "gregkh@linuxfoundation.org" , "linux-kernel@vger.kernel.org" , "devel@linuxdriverproject.org" , "olaf@aepfle.de" , "apw@canonical.com" , "vkuznets@redhat.com" Subject: RE: [PATCH 0/6] Drivers: hv: vmbus Thread-Topic: [PATCH 0/6] Drivers: hv: vmbus Thread-Index: AQHQSVEy+lX2DyRKVkO+0QvUCJOaj5zylQAAgAArCgCAAAUxAA== Date: Mon, 16 Feb 2015 09:01:07 +0000 Message-ID: References: <1424031079-21708-1-git-send-email-kys@microsoft.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [141.251.55.68] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-EOPAttributedMessage: 0 Authentication-Results: spf=pass (sender IP is 206.191.230.4) smtp.mailfrom=decui@microsoft.com; linuxdriverproject.org; dkim=none (message not signed) header.d=none; X-Forefront-Antispam-Report: CIP:206.191.230.4;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10019020)(6009001)(438002)(51704005)(377454003)(13464003)(86362001)(86612001)(6806004)(50466002)(2561002)(66066001)(2656002)(76176999)(54356999)(50986999)(46406003)(33656002)(87936001)(86146001)(47776003)(106116001)(106466001)(46102003)(22756005)(62966003)(77156002)(104016003)(23726002)(97756001)(2201001)(92566002)(102836002)(107886001)(19580395003)(2920100001)(2900100001)(55846006)(19580405001)(1511001)(2501002)(2950100001)(79686002);DIR:OUT;SFP:1102;SCL:1;SRVR:BL2PR03MB388;H:064-smtp-out.microsoft.com;FPR:;SPF:Pass;MLV:sfv;LANG:en; X-Microsoft-Antispam: UriScan:; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:BL2PR03MB388; X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004);SRVR:BL2PR03MB388; X-Forefront-PRVS: 0489CFBAC9 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:;SRVR:BL2PR03MB388; X-OriginatorOrg: microsoft.onmicrosoft.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Feb 2015 09:01:10.4902 (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.230.4] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL2PR03MB388 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3748 Lines: 102 > -----Original Message----- > From: KY Srinivasan > Sent: Monday, February 16, 2015 13:28 PM > To: Dexuan Cui; gregkh@linuxfoundation.org; linux-kernel@vger.kernel.org; > devel@linuxdriverproject.org; olaf@aepfle.de; apw@canonical.com; > vkuznets@redhat.com > Subject: RE: [PATCH 0/6] Drivers: hv: vmbus > > -----Original Message----- > > From: Dexuan Cui > > Sent: Sunday, February 15, 2015 7:19 PM > > To: KY Srinivasan; gregkh@linuxfoundation.org; linux- > > kernel@vger.kernel.org; devel@linuxdriverproject.org; olaf@aepfle.de; > > apw@canonical.com; vkuznets@redhat.com > > Subject: RE: [PATCH 0/6] Drivers: hv: vmbus > > > > > -----Original Message----- > > > From: devel [mailto:driverdev-devel-bounces@linuxdriverproject.org] On > > > Behalf Of K. Y. Srinivasan > > > Sent: Monday, February 16, 2015 4:11 AM > > > To: gregkh@linuxfoundation.org; linux-kernel@vger.kernel.org; > > > devel@linuxdriverproject.org; olaf@aepfle.de; apw@canonical.com; > > > vkuznets@redhat.com > > > Subject: [PATCH 0/6] Drivers: hv: vmbus > > > > > > The host can rescind an offer any time after the offer has been made > > > to the guest. This patch-set cleans up how we handle rescind messages > > > from the host. > > > > > > > > > K. Y. Srinivasan (6): > > > Drivers: hv: vmbus: Properly handle child device remove > > > Drivers: hv: vmbus: Introduce a function to remove a rescinded offer > > > Drivers: hv: vmbus: Handle both rescind and offer messages in the > > > same context > > > Drivers: hv: vmbus: Remove the channel from the channel list(s) on > > > failure > > > Drivers: hv: util: On device remove, close the channel after > > > de-initializing the service > > > Drivers: hv: vmbus: Get rid of some unnecessary messages > > > > > > drivers/hv/channel.c | 9 ++++ > > > drivers/hv/channel_mgmt.c | 95 ++++++++++++++++++++----------------- > > ------- > > > drivers/hv/connection.c | 7 +--- > > > drivers/hv/hv_util.c | 2 +- > > > drivers/hv/vmbus_drv.c | 26 +++++++++--- > > > include/linux/hyperv.h | 1 + > > > 6 files changed, 74 insertions(+), 66 deletions(-) > > > > > > -- > > > > The patchset seems good to me. > > Reviewed-by: Dexuan Cui > > Dexuan, > > Thank you for the review. > > > > BTW, IMO we need one more patch to remove the queue_work() in > > free_channel() -- just make it an ordinary synchronous function call: > > > > vmbus_process_offer() can invoke free_channel() on error path, and > > vmbus_process_rescind() can invoke free_channel() too. > > We should exclude the possible race. > > > I don't see the race; free_channel is only called after ensuring the channel KY, You're correct. Sorry for my misreading. > cannot be discovered > by any other context. Note that we are now executing both rescind and the > offer message in the > same work context. With this patch-set, there are only 3 call sites for > free_channel: > 1. hv_process_channel_removal() > 2. vmbus_free_channels() > 3. vmbus_process_offer() > > If vmbus_process_offer() calls free_channel, the channel cannot be discovered > via its ID as we remove > The chanel from the global as well as the per-cpu lists. In this case, the channel > is destroyed and nobody can get a reference to it. Yeah, I got this now. -- Dexuan > > > > And now the controlwq and work fields of struct vmbus_channel are useless > > now. > > Yes; we can get rid of this now. I will have that in a separate patch. > > Regards, > > K. Y -- 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/