From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f171.google.com (mail-pf0-f171.google.com [209.85.192.171]) by dpdk.org (Postfix) with ESMTP id 18658237 for ; Wed, 6 Sep 2017 04:59:31 +0200 (CEST) Received: by mail-pf0-f171.google.com with SMTP id m1so10773669pfk.1 for ; Tue, 05 Sep 2017 19:59:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:references:in-reply-to:subject:date:message-id :mime-version:content-transfer-encoding:thread-index :content-language:msip_labels; bh=XVS4VnWb3WBlPTDYn1b6M8/s/inzRS1C12UwpnVkRgU=; b=g0v2z/XHTd/Y3Tds0a45WyAS1nvgzfNqJVF62WaENUdBlRKyMzNHXF0Voru2KUNR99 GPOSD3979x6YCy/HHMWyGpUgMDI8GiCvnDJjFeZac+57xVrNQKnTIRelQ/RZEwH/+TcW KzlGdS2tEHxjwH5i3mNOFM/0VeYi/KS7jEbgG6mXhJ4ZujtTVaTn/AtmZ/tBjH69gY4l r7EUVnc6QHRGA+bs99vpC/LlAQGdSIhNHd0xWYcCHehCMDIJiZdzN35j+neeI/xkfW0/ bzJKrj9aMQ27CvcgC5YlXSrgTan2KtB1qH9YAZdESUDkBjfcxttR/QS467e88W1tCBWC 4byQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:references:in-reply-to:subject:date :message-id:mime-version:content-transfer-encoding:thread-index :content-language:msip_labels; bh=XVS4VnWb3WBlPTDYn1b6M8/s/inzRS1C12UwpnVkRgU=; b=QuRMfKLjllcJlwkZ5IDya5ZWBKTmxNFw7wqN3CGd9n4+T0ANsukg+oWi5EBjqtBlO7 PVefHsMQwH/sfQnExrx/og2f2pfI8jM+IzGo17Ny4PIBaJYi+c51deR+29Ew4h8EWq64 qEqKUgho+EbXFU3HltSzDnGKZadQIElzFwfKzzSU8HZZZt3KwHovMLtp/477FM8hJFgu uugpxUAYRU0zGE/a4CUqErrk2ynSMbqQ7URZJaCaCA35jM1XjqK3SeBUtbw6UYfp7Hic b/ASB+epNWSQB2UsuwtYpnbnDcsclDkw/FdsnMLleciRkgKiBdkrpvcmJOBC6TenGKHK 6CCA== X-Gm-Message-State: AHPjjUjkQ7FMCm08YIn5nIyq6ChX67flbT5gJITwhi+cMNX69PVNdLwO y7QE82jrAqHoDYPN X-Google-Smtp-Source: ADKCNb4YPA18e6bx1ZrxqmD6m0uZF6Xn7ZJMtGTbalySa/N0RkTy3ozapSxC0cNKL3hAvovoZU9NPQ== X-Received: by 10.98.25.213 with SMTP id 204mr5777985pfz.0.1504666769892; Tue, 05 Sep 2017 19:59:29 -0700 (PDT) Received: from MININTFU8L5V5 (76-14-207-240.or.wavecable.com. [76.14.207.240]) by smtp.gmail.com with ESMTPSA id i2sm471531pfd.21.2017.09.05.19.59.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Sep 2017 19:59:29 -0700 (PDT) From: "Stephen Hemminger" To: "'Tiwei Bie'" , "'Maxime Coquelin'" Cc: , , , , , , , References: <20170831095023.21037-1-maxime.coquelin@redhat.com> <20170831095023.21037-4-maxime.coquelin@redhat.com> <20170905044516.GC31895@debian-ZGViaWFuCg> <68468145-5b45-5875-b37f-35df3482379a@redhat.com> <20170905100751.GA7290@debian-ZGViaWFuCg> <0362ed01-211f-d4fc-d4ae-11ea81ad5df1@redhat.com> <20170906011459.GA3965@debian-ZGViaWFuCg> In-Reply-To: <20170906011459.GA3965@debian-ZGViaWFuCg> Date: Tue, 5 Sep 2017 19:59:28 -0700 Message-ID: <000e01d326bc$27fdfbe0$77f9f3a0$@networkplumber.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQG6z2UElXKKTbPutkWPu0UMOmvRYgC/qEETAcSsuowCh109aAEzPW0QAbAuMOwCZYAhk6KFNEew Content-Language: en-us msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=True; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Ref=https://api.informationprotection.azure.com/api/72f988bf-86f1-41af-91ab-2d7cd011db47; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Owner=sthemmin@microsoft.com; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2017-09-05T19:59:27.6103678-07:00; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=General; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Application=Microsoft Azure Information Protection; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Extended_MSFT_Method=Automatic; Sensitivity=General Subject: Re: [dpdk-dev] [PATCH 03/21] vhost: protect virtio_net device struct X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Sep 2017 02:59:31 -0000 > > > This lock has currently two purposes: > > > 1. Prevent referencing freed virtio_dev struct in case of numa_realloc. > > > 2. Protect vring pages against invalidation. > > > > > > For 2., it can be fixed by using the per-vq IOTLB lock (it was not the > > > case in my early prototypes that had per device IOTLB cache). > > > > > > For 1., this is an existing problem, so we might consider it is > > > acceptable to keep current state. Maybe it could be improved by only > > > reallocating in case VQ0 is not on the right NUMA node, the other VQs > > > not being initialized at this point. Something like RCU does a better job of protecting against freed virtio_dev. But using RCU requires quiescent callback in the main loop.