linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] virtio: drop a useless config read
@ 2015-03-31 11:55 Michael S. Tsirkin
  2015-03-31 13:02 ` Cornelia Huck
  0 siblings, 1 reply; 3+ messages in thread
From: Michael S. Tsirkin @ 2015-03-31 11:55 UTC (permalink / raw)
  To: linux-kernel; +Cc: Rusty Russell, virtualization

commit d71de9ec6ba806104439d3a669befda84757b5af
    "virtio: core support for config generation"
fixed reading up 64 bit values, adding generation
checks for such reads.

By mistake, it left an explicit get call in place
as well. the result is that the value is read twice,
the first result is discarded.

Not a big deal since this only happens with virtio
blk and only on boot ATM, so performance isn't
affected, but let's clean it up.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
 include/linux/virtio_config.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h
index ca3ed78..ed1e0d5 100644
--- a/include/linux/virtio_config.h
+++ b/include/linux/virtio_config.h
@@ -374,7 +374,6 @@ static inline u64 virtio_cread64(struct virtio_device *vdev,
 				 unsigned int offset)
 {
 	u64 ret;
-	vdev->config->get(vdev, offset, &ret, sizeof(ret));
 	__virtio_cread_many(vdev, offset, &ret, 1, sizeof(ret));
 	return virtio64_to_cpu(vdev, (__force __virtio64)ret);
 }
-- 
MST

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] virtio: drop a useless config read
  2015-03-31 11:55 [PATCH] virtio: drop a useless config read Michael S. Tsirkin
@ 2015-03-31 13:02 ` Cornelia Huck
  2015-04-01  3:14   ` Rusty Russell
  0 siblings, 1 reply; 3+ messages in thread
From: Cornelia Huck @ 2015-03-31 13:02 UTC (permalink / raw)
  To: Michael S. Tsirkin; +Cc: linux-kernel, virtualization

On Tue, 31 Mar 2015 13:55:42 +0200
"Michael S. Tsirkin" <mst@redhat.com> wrote:

> commit d71de9ec6ba806104439d3a669befda84757b5af
>     "virtio: core support for config generation"
> fixed reading up 64 bit values, adding generation
> checks for such reads.
> 
> By mistake, it left an explicit get call in place
> as well. the result is that the value is read twice,
> the first result is discarded.
> 
> Not a big deal since this only happens with virtio
> blk and only on boot ATM, so performance isn't
> affected, but let's clean it up.
> 
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
>  include/linux/virtio_config.h | 1 -
>  1 file changed, 1 deletion(-)

Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] virtio: drop a useless config read
  2015-03-31 13:02 ` Cornelia Huck
@ 2015-04-01  3:14   ` Rusty Russell
  0 siblings, 0 replies; 3+ messages in thread
From: Rusty Russell @ 2015-04-01  3:14 UTC (permalink / raw)
  To: Cornelia Huck, Michael S. Tsirkin; +Cc: linux-kernel, virtualization

Cornelia Huck <cornelia.huck@de.ibm.com> writes:
> On Tue, 31 Mar 2015 13:55:42 +0200
> "Michael S. Tsirkin" <mst@redhat.com> wrote:
>
>> commit d71de9ec6ba806104439d3a669befda84757b5af
>>     "virtio: core support for config generation"
>> fixed reading up 64 bit values, adding generation
>> checks for such reads.
>> 
>> By mistake, it left an explicit get call in place
>> as well. the result is that the value is read twice,
>> the first result is discarded.
>> 
>> Not a big deal since this only happens with virtio
>> blk and only on boot ATM, so performance isn't
>> affected, but let's clean it up.
>> 
>> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
>> ---
>>  include/linux/virtio_config.h | 1 -
>>  1 file changed, 1 deletion(-)
>
> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>

Applied.

Thanks!
Rusty.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-04-01  3:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-31 11:55 [PATCH] virtio: drop a useless config read Michael S. Tsirkin
2015-03-31 13:02 ` Cornelia Huck
2015-04-01  3:14   ` Rusty Russell

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).