linux-hyperv.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: "Himadri Pandya" <himadrispandya@gmail.com>
Cc: "Michael Kelley" <Michael.H.Kelley@microsoft.com>,
	"KY Srinivasan" <kys@messages.microsoft.com>,
	"Haiyang Zhang" <haiyangz@microsoft.com>,
	"Stephen Hemminger" <sthemmin@microsoft.com>, <sashal@kernel.org>,
	<linux-hyperv@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	"himadri18.07" <himadri18.07@gmail.com>
Subject: Re: [PATCH 2/2] Drivers: hv: util: Specify ring buffer size using Hyper-V page size
Date: Fri, 26 Jul 2019 09:06:05 -0700	[thread overview]
Message-ID: <20190726090605.5026de8c@hermes.lan> (raw)
In-Reply-To: <20190725050315.6935-3-himadri18.07@gmail.com>

On Wed, 24 Jul 2019 22:03:15 -0700
"Himadri Pandya" <himadrispandya@gmail.com> wrote:

> VMbus ring buffers are sized based on the 4K page size used by
> Hyper-V. The Linux guest page size may not be 4K on all architectures
> so use the Hyper-V page size to specify the ring buffer size.
> 
> Signed-off-by: Himadri Pandya <himadri18.07@gmail.com>
> ---
>  drivers/hv/hv_util.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/hv/hv_util.c b/drivers/hv/hv_util.c
> index c2c08f26bd5f..766bd8457346 100644
> --- a/drivers/hv/hv_util.c
> +++ b/drivers/hv/hv_util.c
> @@ -413,8 +413,9 @@ static int util_probe(struct hv_device *dev,
>  
>  	hv_set_drvdata(dev, srv);
>  
> -	ret = vmbus_open(dev->channel, 4 * PAGE_SIZE, 4 * PAGE_SIZE, NULL,
> 0,
> -			srv->util_cb, dev->channel);
> +	ret = vmbus_open(dev->channel, 4 * HV_HYP_PAGE_SIZE,
> +			 4 * HV_HYP_PAGE_SIZE, NULL, 0, srv->util_cb,
> +			 dev->channel);
>  	if (ret)
>  		goto error;
>  

hv_util doesn't need lots of buffering. Why not define a fixed
value across all architectures. Maybe with some roundup to HV_HYP_PAGE_SIZE.

  reply	other threads:[~2019-07-26 16:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-25  5:03 [PATCH 0/2] Drivers: hv: Specify buffer size using Hyper-V page size Himadri Pandya
2019-07-25  5:03 ` [PATCH 1/2] Drivers: hv: Specify receive " Himadri Pandya
2019-07-26 16:07   ` Stephen Hemminger
2019-07-25  5:03 ` [PATCH 2/2] Drivers: hv: util: Specify ring " Himadri Pandya
2019-07-26 16:06   ` Stephen Hemminger [this message]
     [not found] ` <DM5PR21MB01377E1E6DE541E902A12EEFD7B80@DM5PR21MB0137.namprd21.prod.outlook.com>
2019-10-04 15:29   ` [PATCH 0/2] Drivers: hv: Specify " Sasha Levin

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=20190726090605.5026de8c@hermes.lan \
    --to=stephen@networkplumber.org \
    --cc=Michael.H.Kelley@microsoft.com \
    --cc=haiyangz@microsoft.com \
    --cc=himadri18.07@gmail.com \
    --cc=himadrispandya@gmail.com \
    --cc=kys@messages.microsoft.com \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sashal@kernel.org \
    --cc=sthemmin@microsoft.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;
as well as URLs for NNTP newsgroup(s).