diff options
author | K. Y. Srinivasan <kys@microsoft.com> | 2017-04-30 16:21:17 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-05-18 16:55:28 +0200 |
commit | 1e052a16eb2caf6727b594cad0744ccdfddf4254 (patch) | |
tree | f0295abe9b57148d11ac82bf8768728f7946bef6 /drivers/hv/hyperv_vmbus.h | |
parent | 48f4ccdfc46906627f77fda94d80f2db1bd23ba3 (diff) | |
download | linux-stable-1e052a16eb2caf6727b594cad0744ccdfddf4254.tar.gz linux-stable-1e052a16eb2caf6727b594cad0744ccdfddf4254.tar.bz2 linux-stable-1e052a16eb2caf6727b594cad0744ccdfddf4254.zip |
Drivers: hv: util: Make hv_poll_channel() a little more efficient
The current code unconditionally sends an IPI. If we are running on the
correct CPU and are in interrupt level, we don't need an IPI.
Make this adjustment.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hv/hyperv_vmbus.h')
-rw-r--r-- | drivers/hv/hyperv_vmbus.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/hv/hyperv_vmbus.h b/drivers/hv/hyperv_vmbus.h index 6113e915c50e..fa514be7679c 100644 --- a/drivers/hv/hyperv_vmbus.h +++ b/drivers/hv/hyperv_vmbus.h @@ -411,6 +411,10 @@ static inline void hv_poll_channel(struct vmbus_channel *channel, if (!channel) return; + if (in_interrupt() && (channel->target_cpu == smp_processor_id())) { + cb(channel); + return; + } smp_call_function_single(channel->target_cpu, cb, channel, true); } |