Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754198AbbLLAuA (ORCPT ); Fri, 11 Dec 2015 19:50:00 -0500 Received: from mail-bl2on0103.outbound.protection.outlook.com ([65.55.169.103]:57372 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752594AbbLLAt6 convert rfc822-to-8bit (ORCPT ); Fri, 11 Dec 2015 19:49:58 -0500 From: KY Srinivasan To: Dexuan Cui , "gregkh@linuxfoundation.org" , "linux-kernel@vger.kernel.org" , "devel@linuxdriverproject.org" , "olaf@aepfle.de" , "apw@canonical.com" , "vkuznets@redhat.com" , "jasowang@redhat.com" Subject: RE: [PATCH V2 02/10] Drivers: hv: utils: run polling callback always in interrupt context Thread-Topic: [PATCH V2 02/10] Drivers: hv: utils: run polling callback always in interrupt context Thread-Index: AQHREqNs9EyathPhHkS47FeNJvCQUJ7EQviAgADXb6CAAIyygIAAA1PQ Date: Sat, 12 Dec 2015 00:49:54 +0000 Message-ID: References: <1446167538-19409-1-git-send-email-kys@microsoft.com> <1446167566-19448-1-git-send-email-kys@microsoft.com> <1446167566-19448-2-git-send-email-kys@microsoft.com> <02dd0f8d7f8e4cacb9e54a067fd483e4@HKXPR3004MB0088.064d.mgd.msft.net> In-Reply-To: <02dd0f8d7f8e4cacb9e54a067fd483e4@HKXPR3004MB0088.064d.mgd.msft.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=kys@microsoft.com; x-originating-ip: [2601:600:8c01:121d:7c20:ccd6:4f91:43a9] x-ld-processed: 72f988bf-86f1-41af-91ab-2d7cd011db47,ExtAddr,ExtAddr x-microsoft-exchange-diagnostics: 1;SN1PR0301MB1663;5:3yVZKAIGfeUSnLR5U/ZLz5hxuMgCKShfr4FY04EnveyFASa9ZcuIrqFa0YBgL7nlxvSujxELydyNbV00jRnDm0V1BQuqkK+A0mxHi2eCi1VazYZTpbLoNDMi50VDRiDnE+uSa7acdzfFXUBvHEhbgw==;24:lqySlmwgUOPPVgQLgsFgHbWLTqVzFc2zHWxipZR7GmnCY+ssLps4py9bdqTuH18Cv9+xRw5wuBt2xBT8roNyUNh1Np2wry9FHsLCYCawIw0= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:SN1PR0301MB1663; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(61425038)(601004)(2401047)(5005006)(520078)(8121501046)(3002001)(10201501046)(61426038)(61427038);SRVR:SN1PR0301MB1663;BCL:0;PCL:0;RULEID:;SRVR:SN1PR0301MB1663; x-forefront-prvs: 07880C4932 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(189002)(199003)(164054003)(13464003)(377454003)(2501003)(87936001)(105586002)(2201001)(8990500004)(54356999)(2421001)(586003)(74316001)(5004730100002)(76176999)(5890100001)(86612001)(10090500001)(5008740100001)(97736004)(2900100001)(10400500002)(189998001)(5005710100001)(81156007)(76576001)(15975445007)(2950100001)(86362001)(5001770100001)(102836003)(19580405001)(50986999)(40100003)(551934003)(77096005)(6116002)(10290500002)(5003600100002)(92566002)(1511001)(122556002)(99286002)(106116001)(2561002)(1220700001)(93886004)(106356001)(5001960100002)(33656002)(5002640100001)(1096002)(101416001)(107886002)(19580395003)(3826002);DIR:OUT;SFP:1102;SCL:1;SRVR:SN1PR0301MB1663;H:SN1PR0301MB1662.namprd03.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Dec 2015 00:49:55.0256 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR0301MB1663 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2318 Lines: 71 > -----Original Message----- > From: Dexuan Cui > Sent: Thursday, December 10, 2015 11:33 PM > To: KY Srinivasan ; gregkh@linuxfoundation.org; linux- > kernel@vger.kernel.org; devel@linuxdriverproject.org; olaf@aepfle.de; > apw@canonical.com; vkuznets@redhat.com; jasowang@redhat.com > Subject: RE: [PATCH V2 02/10] Drivers: hv: utils: run polling callback always in > interrupt context > > > -----Original Message----- > > From: KY Srinivasan > > Sent: Friday, December 11, 2015 7:23 > > > It looks the patch has not been Greg's tree yet. > > > > > > I have 2 questions about the patch: > > > > > > 1. hv_poll_channel() is invoked in fcopy_handle_handshake(), but not in > > > vss_handle_handshake() and kvp_handle_handshake(). > > > Why -- I guess we missed the vss/kvp cases somehow? > > I will fix this. > > Thanks, KY! > BTW, I fixed another small issue by https://lkml.org/lkml/2015/12/10/50 > (The mail is attached for your convenience) I will pick this up. > > > > 2. With the patch, hv_fcopy_onchannelcallback() can be invoked in the > > > tasklet (i.e., vmbus_on_event(). NB: local irq is enabled), and in the > > > hard irq handler(the IPI handler, e.g., > > > fcopy_poll_wrapper() -> fcopy_poll_wrapper()). > > > > > > Can the former be interrupted by the latter? > > > e.g., when the callback is running in the tasklet on vCPU0, > > > fcopy_timeout_func() or fcopy_on_msg() could send the IPI to > > > vCPU0 from another vCPU. > > > > Keep in mind that when the poll function is run, the state will not be > > HVUTIL_READY. The state will be set to HVUTIL_READY in the IPI > > handler. So, it is ok if the tasklet is interrupted by the IPI handler. > > > > K. Y > > Got it. > > BTW, in fcopy_handle_handshake(), IMO the line > fcopy_transaction.state = HVUTIL_READY; > just before > hv_poll_channel(fcopy_transaction.recv_channel, fcopy_poll_wrapper); > should be removed? Because in fcopy_poll_wrapper() we always have > the same line. > > Ditto for kvp/vss. > > Thanks, I will fix this and resend. Thanks, K. Y > -- 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/