diff mbox series

[v3,for-4.4,3/7] Drivers: hv: vmbus: Reduce the delay between retries in vmbus_post_msg()

Message ID 1492673923-1352-4-git-send-email-sumit.semwal@linaro.org
State New
Headers show
Series hv patches for 4.4.y (resubmit) | expand

Commit Message

Sumit Semwal April 20, 2017, 7:38 a.m. UTC
From: "K. Y. Srinivasan" <kys@microsoft.com>


[ Upstream commit 8de0d7e951826d7592e0ba1da655b175c4aa0923 ]

The current delay between retries is unnecessarily high and is negatively
affecting the time it takes to boot the system.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>

---
 drivers/hv/connection.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

-- 
2.7.4

Comments

Ben Hutchings May 9, 2017, 12:36 p.m. UTC | #1
On Thu, 2017-04-20 at 13:08 +0530, Sumit Semwal wrote:
> From: "K. Y. Srinivasan" <kys@microsoft.com>

> 

> [ Upstream commit 8de0d7e951826d7592e0ba1da655b175c4aa0923 ]

> 

> The current delay between retries is unnecessarily high and is negatively

> affecting the time it takes to boot the system.

> 

> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>

> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

> Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>

[...]

Should this also be applied to 4.4?

commit c0bb03924f1a80e7f65900e36c8e6b3dc167c5f8
Author: Vitaly Kuznetsov <vkuznets@redhat.com>
Date:   Wed Dec 7 01:16:24 2016 -0800

    Drivers: hv: vmbus: Raise retry/wait limits in vmbus_post_msg()

Ben.

-- 
Ben Hutchings
Software Developer, Codethink Ltd.
Sumit Semwal May 9, 2017, 12:41 p.m. UTC | #2
Hi Ben,

On 9 May 2017 at 18:06, Ben Hutchings <ben.hutchings@codethink.co.uk> wrote:
> On Thu, 2017-04-20 at 13:08 +0530, Sumit Semwal wrote:

>> From: "K. Y. Srinivasan" <kys@microsoft.com>

>>

>> [ Upstream commit 8de0d7e951826d7592e0ba1da655b175c4aa0923 ]

>>

>> The current delay between retries is unnecessarily high and is negatively

>> affecting the time it takes to boot the system.

>>

>> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>

>> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

>> Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>

> [...]

>

> Should this also be applied to 4.4?

>

> commit c0bb03924f1a80e7f65900e36c8e6b3dc167c5f8

> Author: Vitaly Kuznetsov <vkuznets@redhat.com>

> Date:   Wed Dec 7 01:16:24 2016 -0800

>

>     Drivers: hv: vmbus: Raise retry/wait limits in vmbus_post_msg()


I tried to rebase that to 4.4 code base, but 4.4 seems to require some
more patches to make it work - some of those patches might not fit the
stable requirements.

I'm not a hv expert, so didn't want to mess up, and hence didn't send it.

Best,
Sumit.
>

> Ben.

>

> --

> Ben Hutchings

> Software Developer, Codethink Ltd.

>

>




-- 
Thanks and regards,

Sumit Semwal
Linaro Mobile Group - Kernel Team Lead
Linaro.org │ Open source software for ARM SoCs
Ben Hutchings May 9, 2017, 12:50 p.m. UTC | #3
On Tue, 2017-05-09 at 18:11 +0530, Sumit Semwal wrote:
> Hi Ben,

> 

> On 9 May 2017 at 18:06, Ben Hutchings <ben.hutchings@codethink.co.uk> wrote:

> > On Thu, 2017-04-20 at 13:08 +0530, Sumit Semwal wrote:

> >> From: "K. Y. Srinivasan" <kys@microsoft.com>

> >>

> >> [ Upstream commit 8de0d7e951826d7592e0ba1da655b175c4aa0923 ]

> >>

> >> The current delay between retries is unnecessarily high and is negatively

> >> affecting the time it takes to boot the system.

> >>

> >> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>

> >> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

> >> Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>

> > [...]

> >

> > Should this also be applied to 4.4?

> >

> > commit c0bb03924f1a80e7f65900e36c8e6b3dc167c5f8

> > Author: Vitaly Kuznetsov <vkuznets@redhat.com>

> > Date:   Wed Dec 7 01:16:24 2016 -0800

> >

> >     Drivers: hv: vmbus: Raise retry/wait limits in vmbus_post_msg()

> 

> I tried to rebase that to 4.4 code base, but 4.4 seems to require some

> more patches to make it work - some of those patches might not fit the

> stable requirements.

> 

> I'm not a hv expert, so didn't want to mess up, and hence didn't send it.


If it touches some functions that don't exist in 4.4, those parts could
just be dropped.

Ben.

-- 
Ben Hutchings
Software Developer, Codethink Ltd.
KY Srinivasan May 11, 2017, 12:25 a.m. UTC | #4
> -----Original Message-----

> From: Sumit Semwal [mailto:sumit.semwal@linaro.org]

> Sent: Tuesday, May 9, 2017 5:41 AM

> To: Ben Hutchings <ben.hutchings@codethink.co.uk>

> Cc: stable@vger.kernel.org; KY Srinivasan <kys@microsoft.com>; Greg

> Kroah-Hartman <gregkh@linuxfoundation.org>

> Subject: Re: [v3 PATCH for-4.4 3/7] Drivers: hv: vmbus: Reduce the delay

> between retries in vmbus_post_msg()

> 

> Hi Ben,

> 

> On 9 May 2017 at 18:06, Ben Hutchings <ben.hutchings@codethink.co.uk>

> wrote:

> > On Thu, 2017-04-20 at 13:08 +0530, Sumit Semwal wrote:

> >> From: "K. Y. Srinivasan" <kys@microsoft.com>

> >>

> >> [ Upstream commit 8de0d7e951826d7592e0ba1da655b175c4aa0923 ]

> >>

> >> The current delay between retries is unnecessarily high and is negatively

> >> affecting the time it takes to boot the system.

> >>

> >> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>

> >> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

> >> Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>

> > [...]

> >

> > Should this also be applied to 4.4?

> >

> > commit c0bb03924f1a80e7f65900e36c8e6b3dc167c5f8

> > Author: Vitaly Kuznetsov <vkuznets@redhat.com>

> > Date:   Wed Dec 7 01:16:24 2016 -0800

> >

> >     Drivers: hv: vmbus: Raise retry/wait limits in vmbus_post_msg()

> 

> I tried to rebase that to 4.4 code base, but 4.4 seems to require some

> more patches to make it work - some of those patches might not fit the

> stable requirements.

> 

> I'm not a hv expert, so didn't want to mess up, and hence didn't send it.


I am not sure if all the needed changes will meet the stable requirements.

K. Y
> 

> Best,

> Sumit.

> >

> > Ben.

> >

> > --

> > Ben Hutchings

> > Software Developer, Codethink Ltd.

> >

> >

> 

> 

> 

> --

> Thanks and regards,

> 

> Sumit Semwal

> Linaro Mobile Group - Kernel Team Lead

> Linaro.org │ Open source software for ARM SoCs
diff mbox series

Patch

diff --git a/drivers/hv/connection.c b/drivers/hv/connection.c
index 4fc2e88..2bbc530 100644
--- a/drivers/hv/connection.c
+++ b/drivers/hv/connection.c
@@ -429,7 +429,7 @@  int vmbus_post_msg(void *buffer, size_t buflen)
 	union hv_connection_id conn_id;
 	int ret = 0;
 	int retries = 0;
-	u32 msec = 1;
+	u32 usec = 1;
 
 	conn_id.asu32 = 0;
 	conn_id.u.id = VMBUS_MESSAGE_CONNECTION_ID;
@@ -462,9 +462,9 @@  int vmbus_post_msg(void *buffer, size_t buflen)
 		}
 
 		retries++;
-		msleep(msec);
-		if (msec < 2048)
-			msec *= 2;
+		udelay(usec);
+		if (usec < 2048)
+			usec *= 2;
 	}
 	return ret;
 }