vhost: copy_from_user -> __copy_from_user
Subsystems (5)
Michael S. Tsirkin
maintainerPATCH 1/1 vhost: copy_from_user -> __copy_from_user
copy_from_user is pretty high on perf top profile, replacing it with __copy_from_user helps.
It's also safe because we do access_ok checks during setup.
--- drivers/vhost/vhost.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/vhost/vhost.c +1 -1
@@ -1153,7 +1153,7 @@ int vhost_get_vq_desc(struct vhost_dev *dev, struct vhost_virtqueue *vq, i, vq->num, head);return -EINVAL ; } - ret =copy_from_user (&desc, vq->desc + i,sizeof desc); + ret =__copy_from_user (&desc, vq->desc + i,sizeof desc);if (unlikely (ret)) {vq_err (vq,"Failed to get descriptor: idx %d addr %p\n" , i, vq->desc + i);
Signature · 1 line
1.7.3.2.91.g446ac
David Miller
maintainerFrom: "Michael S. Tsirkin" <[email protected]>
Date: Sun, 6 Mar 2011 13:33:49 +0200
Quoted 5 lines
copy_from_useris pretty high on perf top profile, replacing it with__copy_from_userhelps.
It's also safe because we doaccess_okchecks during setup.Signed-off-by Michael S. Tsirkin <[email protected]>
Is Rusty going to take this or should I?
Michael S. Tsirkin
maintainerQuoted 10 lines · David Miller
From: "Michael S. Tsirkin" <[email protected]>
Date: Sun, 6 Mar 2011 13:33:49 +0200Quoted 5 lines
copy_from_useris pretty high on perf top profile, replacing it with__copy_from_userhelps.
It's also safe because we doaccess_okchecks during setup.Signed-off-by Michael S. Tsirkin <[email protected]>Is Rusty going to take this or should I?
Sorry about not making this clear. I'll give it a day or two for review then put it on the vhost tree myself.
Thanks!
Michael S. Tsirkin
maintainerQuoted 10 lines · David Miller
From: "Michael S. Tsirkin" <[email protected]>
Date: Sun, 6 Mar 2011 13:33:49 +0200Quoted 5 lines
copy_from_useris pretty high on perf top profile, replacing it with__copy_from_userhelps.
It's also safe because we doaccess_okchecks during setup.Signed-off-by Michael S. Tsirkin <[email protected]>Is Rusty going to take this or should I?
Sorry about not making this clear. I'll give it a day or two for review then put it on the vhost tree myself.
Thanks!
David Miller
maintainerFrom: "Michael S. Tsirkin" <[email protected]>
Date: Sun, 6 Mar 2011 13:33:49 +0200
Quoted 5 lines
copy_from_useris pretty high on perf top profile, replacing it with__copy_from_userhelps.
It's also safe because we doaccess_okchecks during setup.Signed-off-by Michael S. Tsirkin <[email protected]>
Is Rusty going to take this or should I?