1
0
Fork 0

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>
hifive-unleashed-5.1
K. Y. Srinivasan 2017-04-30 16:21:17 -07:00 committed by Greg Kroah-Hartman
parent 48f4ccdfc4
commit 1e052a16eb
1 changed files with 4 additions and 0 deletions

View File

@ -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);
}