mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Radim Krcmar <rkrcmar@redhat.com>
To: Vitaly Kuznetsov <vkuznets@redhat.com>
Cc: devel@linuxdriverproject.org, linux-kernel@vger.kernel.org,
	"K. Y. Srinivasan" <kys@microsoft.com>,
	Haiyang Zhang <haiyangz@microsoft.com>,
	Cathy Avery <cavery@redhat.com>
Subject: Re: [PATCH 1/4] Drivers: hv: vmbus: don't loose HVMSG_TIMER_EXPIRED messages
Date: Mon, 15 Feb 2016 21:50:30 +0100	[thread overview]
Message-ID: <20160215205030.GC10555@potion.brq.redhat.com> (raw)
In-Reply-To: <1455291770-15672-2-git-send-email-vkuznets@redhat.com>

2016-02-12 16:42+0100, Vitaly Kuznetsov:
> We must handle HVMSG_TIMER_EXPIRED messages in the interrupt context
> and we offload all the rest to vmbus_on_msg_dpc() tasklet. This functions
> loops to see if there are new messages pending. In case we'll ever see
> HVMSG_TIMER_EXPIRED message there we're going to lose it as we can't
> handle it from there. Avoid looping in vmbus_on_msg_dpc(), we're OK
> with handling one message per interrupt.

We could loop as long as the message type is handleable in the tasklet,
which might increase performance, but the code nicer this way;

Reviewed-by: Radim Krčmář <rkrcmar@redhat.com>

> Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
> ---
> diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c
> @@ -716,51 +716,49 @@ static void vmbus_on_msg_dpc(unsigned long data)
>  	struct vmbus_channel_message_table_entry *entry;
>  	struct onmessage_work_context *ctx;
>  
> -	while (1) {
> -		if (msg->header.message_type == HVMSG_NONE)
> -			/* no msg */
> -			break;
> +	if (msg->header.message_type == HVMSG_NONE)

(This condition should never be true now.)

> +		/* no msg */
> +		return;

Btw. what is/are the other HVMSG_* that we get?

  reply	other threads:[~2016-02-15 20:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-12 15:42 [PATCH 0/4] Drivers: hv: vmbus: bugfix and improvements for message handling Vitaly Kuznetsov
2016-02-12 15:42 ` [PATCH 1/4] Drivers: hv: vmbus: don't loose HVMSG_TIMER_EXPIRED messages Vitaly Kuznetsov
2016-02-15 20:50   ` Radim Krcmar [this message]
2016-02-12 15:42 ` [PATCH 2/4] Drivers: hv: vmbus: avoid wait_for_completion() on crash Vitaly Kuznetsov
2016-02-15 21:00   ` Radim Krcmar
2016-02-12 15:42 ` [PATCH 3/4] Drivers: hv: vmbus: remove code duplication in message handling Vitaly Kuznetsov
2016-02-15 21:01   ` Radim Krcmar
2016-02-12 15:42 ` [PATCH 4/4] Drivers: hv: vmbus: avoid unneeded compiler optimizations in vmbus_wait_for_unload() Vitaly Kuznetsov
2016-02-15 21:12   ` Radim Krcmar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160215205030.GC10555@potion.brq.redhat.com \
    --to=rkrcmar@redhat.com \
    --cc=cavery@redhat.com \
    --cc=devel@linuxdriverproject.org \
    --cc=haiyangz@microsoft.com \
    --cc=kys@microsoft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vkuznets@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®