<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">Definitely yes, my fault. Thanks!<br>
</p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Vasiliy Averin<br>
<b>Sent:</b> Monday, February 26, 2018 3:50:54 PM<br>
<b>To:</b> Oleg Babin; Andrey Ryabinin<br>
<b>Cc:</b> devel@openvz.org<br>
<b>Subject:</b> Re: [Devel] [PATCH vz7] net/vhost: Replace kmalloc with kvmalloc for order>=3</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">is it probably kfree -> kvfree required too ?<br>
<br>
On 2018-02-26 15:29, Oleg Babin wrote:<br>
> [This sender failed our fraud detection checks and may not be who they appear to be. Learn about spoofing at
<a href="http://aka.ms/LearnAboutSpoofing">http://aka.ms/LearnAboutSpoofing</a>]<br>
> <br>
> Currently we allocate more than eight pages of memory in<br>
> vhost_net_set_ubuf_info() function and we do not need<br>
> them to be physically contiguous, so it is feasible to<br>
> replace a call to kmalloc() with a call to kvmalloc().<br>
> <br>
> <a href="https://jira.sw.ru/browse/PSBM-81803">https://jira.sw.ru/browse/PSBM-81803</a><br>
> Signed-off-by: Oleg Babin <obabin@virtuozzo.com><br>
> ---<br>
> drivers/vhost/net.c | 4 ++--<br>
> 1 file changed, 2 insertions(+), 2 deletions(-)<br>
> <br>
> diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c<br>
> index 1076a46..d397ceb 100644<br>
> --- a/drivers/vhost/net.c<br>
> +++ b/drivers/vhost/net.c<br>
> @@ -179,8 +179,8 @@ int vhost_net_set_ubuf_info(struct vhost_net *n)<br>
> zcopy = vhost_net_zcopy_mask & (0x1 << i);<br>
> if (!zcopy)<br>
> continue;<br>
> - n->vqs[i].ubuf_info = kmalloc(sizeof(*n->vqs[i].ubuf_info) *<br>
> - UIO_MAXIOV, GFP_KERNEL);<br>
> + n->vqs[i].ubuf_info = kvmalloc(sizeof(*n->vqs[i].ubuf_info) *<br>
> + UIO_MAXIOV, GFP_KERNEL);<br>
> if (!n->vqs[i].ubuf_info)<br>
> goto err;<br>
> }<br>
> --<br>
> 1.8.3.1<br>
> <br>
> _______________________________________________<br>
> Devel mailing list<br>
> Devel@openvz.org<br>
> <a href="https://lists.openvz.org/mailman/listinfo/devel">https://lists.openvz.org/mailman/listinfo/devel</a><br>
> <br>
</div>
</span></font></div>
</body>
</html>