From patchwork Tue Apr 9 11:48:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Coquelin X-Patchwork-Id: 852 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id AA07F43E29; Tue, 9 Apr 2024 13:48:57 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2BB8C402C6; Tue, 9 Apr 2024 13:48:57 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 4FECA402C0 for ; Tue, 9 Apr 2024 13:48:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1712663334; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OBThk2BZHryPH8/HPQu7B2VWjHnH2SqF3mfHDvzUqvI=; b=Xl8jONfe6VFxJiY6S+vvxpzUfSkFZwOXVurAMTylpZM2qkAk4j1aSt2X0w1kgAiZ70XMlF sNksEl4zhpf8QK5Ow5R+cZt4Y4NzZVVp3uZwfJshIOF3frXjOoNw8xSuT0aVovV4AcC+4q y5KqWixQ8EJDWaj6aezPXLarjiuM2pM= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-46-1JoCXZJjOsiU4mkTtt-4PA-1; Tue, 09 Apr 2024 07:48:53 -0400 X-MC-Unique: 1JoCXZJjOsiU4mkTtt-4PA-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 267F5889AA5; Tue, 9 Apr 2024 11:48:53 +0000 (UTC) Received: from max-p1.redhat.com (unknown [10.39.208.27]) by smtp.corp.redhat.com (Postfix) with ESMTP id B80B410060FE; Tue, 9 Apr 2024 11:48:51 +0000 (UTC) From: Maxime Coquelin To: dev@dpdk.org, david.marchand@redhat.com, chenbox@nvidia.com Cc: Maxime Coquelin Subject: [PATCH v3 0/5] vhost: FD manager improvements Date: Tue, 9 Apr 2024 13:48:40 +0200 Message-ID: <20240409114845.1336403-1-maxime.coquelin@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org This series aims at improving the Vhost FD manager. The fdset internals is hidden from its callers, the notification/synchronization is made systematic for every FD add/del operations and finally the code is reworked to make use of epoll insteal of poll which reduces the complexity (less locks involved, synchrnoization no more necessary). The series has been tested with both Vhost-user/Virtio-user and with VDUSE. Only change in this revision is removing mistakenly added temporary file in patch 3. David Marchand (1): vhost: manage FD with epoll Maxime Coquelin (4): vhost: rename polling mutex vhost: make use of FD manager init function vhost: hide synchronization within FD manager vhost: improve fdset initialization lib/vhost/fd_man.c | 431 +++++++++++++++++++++------------------------ lib/vhost/fd_man.h | 48 +---- lib/vhost/socket.c | 38 +--- lib/vhost/vduse.c | 52 ++---- 4 files changed, 224 insertions(+), 345 deletions(-)