Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752990AbdLAOyL (ORCPT ); Fri, 1 Dec 2017 09:54:11 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:35246 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752647AbdLAOyJ (ORCPT ); Fri, 1 Dec 2017 09:54:09 -0500 Subject: Re: [PATCH net,stable v4 0/3] vhost: fix a few skb leaks To: "Michael S. Tsirkin" , wexu@redhat.com Cc: virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, jasowang@redhat.com References: <1512123038-15773-1-git-send-email-wexu@redhat.com> <20171201164731-mutt-send-email-mst@kernel.org> From: Matthew Rosato Date: Fri, 1 Dec 2017 09:54:02 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171201164731-mutt-send-email-mst@kernel.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 x-cbid: 17120114-0036-0000-0000-00000294CEC9 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008136; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000242; SDB=6.00953900; UDB=6.00482025; IPR=6.00733975; BA=6.00005726; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00018290; XFM=3.00000015; UTC=2017-12-01 14:54:06 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17120114-0037-0000-0000-0000428B1634 Message-Id: <9ef31370-4042-b701-e983-90b8f20a2a39@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-12-01_03:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1712010164 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1553 Lines: 54 On 12/01/2017 09:47 AM, Michael S. Tsirkin wrote: > On Fri, Dec 01, 2017 at 05:10:35AM -0500, wexu@redhat.com wrote: >> From: Wei Xu >> >> Matthew found a roughly 40% tcp throughput regression with commit >> c67df11f(vhost_net: try batch dequing from skb array) as discussed >> in the following thread: >> https://www.mail-archive.com/netdev@vger.kernel.org/msg187936.html > > Series > > Acked-by: Michael S. Tsirkin Tested this series on a z13 (s390x) on top of net-next using 4GB/4vcpu guests. Verified that both the reported TCP throughput regression and memory leak are resolved. net-next: 19.83 Gb/s net-next+: 35.02 Gb/s Thanks all! Matt > > >> v4: >> - fix zero iov iterator count in tap/tap_do_read()(Jason) >> - don't put tun in case of EBADFD(Jason) >> - Replace msg->msg_control with new 'skb' when calling tun/tap_do_read() >> >> v3: >> - move freeing skb from vhost to tun/tap recvmsg() to not >> confuse the callers. >> >> v2: >> - add Matthew as the reporter, thanks matthew. >> - moving zero headcount check ahead instead of defer consuming skb >> due to jason and mst's comment. >> - add freeing skb in favor of recvmsg() fails. >> >> Wei Xu (3): >> vhost: fix skb leak in handle_rx() >> tun: free skb in early errors >> tap: free skb if flags error >> >> drivers/net/tap.c | 14 ++++++++++---- >> drivers/net/tun.c | 24 ++++++++++++++++++------ >> drivers/vhost/net.c | 20 ++++++++++---------- >> 3 files changed, 38 insertions(+), 20 deletions(-) >> >> -- >> 1.8.3.1 >