From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by passt.top (Postfix) with ESMTP id A60A85A004F for ; Fri, 26 Jul 2024 12:44:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1721990689; 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: in-reply-to:in-reply-to:references:references; bh=6UoZqZOIsCG0yMkwo2klzgkVI/Klan9SQAVhIrXCn8k=; b=VcZZYkgPw/A51LKbCBCnS9i410lTYICayL5L9vdATCsC9ROrKXMJHQSlf/aJ6VJnb75UM7 Fbu4wRxT9ik/hmUk1HpeiXdOwMwYKMcQCjfthyIp+ISFKOS1U/Crj0SFth7x2js1trYHDb SqXaBtvGFrb/Ap9/G/5mdrqVRGJhs9w= Received: from mail-oo1-f72.google.com (mail-oo1-f72.google.com [209.85.161.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-679-s3y7P4gPOuiCjmKY4mPWEQ-1; Fri, 26 Jul 2024 06:44:48 -0400 X-MC-Unique: s3y7P4gPOuiCjmKY4mPWEQ-1 Received: by mail-oo1-f72.google.com with SMTP id 006d021491bc7-5d5ba96af29so834903eaf.0 for ; Fri, 26 Jul 2024 03:44:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721990686; x=1722595486; h=content-transfer-encoding:mime-version:organization:references :in-reply-to:message-id:subject:cc:to:from:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=6UoZqZOIsCG0yMkwo2klzgkVI/Klan9SQAVhIrXCn8k=; b=hhjDUqN+3/Rn6w1B6UMQ9cJzruqooZ0CdB2/u01AEkmuF0BQZHAjzFerpHP9RkARi+ NG+X9w90e6UXNexm76QzRCGY/dBDEDmw5+Ab8dlsbe5pXe7YTrqrB/tDJms9F2yuByZB 2n+Ut3vWPCnRdMWKAFRZJrCgVcadaXGpUIBPYrKsiDu92kaghtgBX2dlcGcz6CC4vuFi 3YhBa0JN7MIyguTtfDfUQz5D8dXpPPDvBeOlfxB5yHdlVAftGiGwn28VfzpdEN9mNfEo /7ASQP6wI/8qdk04vdIvR+RouJMkmxaOt+gXHEoh1kgpJcAqm2PaOeWO12/azxWjOFGb nu8A== X-Gm-Message-State: AOJu0YxOGj6U9lxP33KJgFQ0ZO3NQ6gzZ6vs/Wdami93ghtZRB9OVWTe DZDfIFb0ZGRZ/58fIH878Z+cshu5WDPPzGdJlffDEmhes+u2z6zEeqkHkE3nkVLIfLKuAD8OqTX hlGQhseDciGirL7gokpPZsiAznYg+Gg/KM82CiZF71O3Xm7q9ycrDFqsYJki5 X-Received: by 2002:a05:6358:988a:b0:1a1:fe6f:a2f3 with SMTP id e5c5f4694b2df-1acfb88bc64mr663759355d.1.1721990686664; Fri, 26 Jul 2024 03:44:46 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF+C4V1okqEOSk25FLDXWcJKo8SphMHRGcYDKYipe+q2/bu7IkLwAPgyOc/cSMeR3YyhGSl5Q== X-Received: by 2002:a05:6358:988a:b0:1a1:fe6f:a2f3 with SMTP id e5c5f4694b2df-1acfb88bc64mr663756855d.1.1721990685977; Fri, 26 Jul 2024 03:44:45 -0700 (PDT) Received: from maya.cloud.tilaa.com (maya.cloud.tilaa.com. [164.138.29.33]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7a1d73ee9dfsm165112685a.71.2024.07.26.03.44.45 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 26 Jul 2024 03:44:45 -0700 (PDT) Date: Fri, 26 Jul 2024 12:44:11 +0200 From: Stefano Brivio To: David Gibson Subject: Re: [PATCH 3/5] tap: Don't use EPOLLET on Qemu sockets Message-ID: <20240726124411.5dbe9cfa@elisabeth> In-Reply-To: <20240726100056.235b65de@elisabeth> References: <20240726072031.3941305-1-david@gibson.dropbear.id.au> <20240726072031.3941305-4-david@gibson.dropbear.id.au> <20240726100056.235b65de@elisabeth> Organization: Red Hat X-Mailer: Claws Mail 4.2.0 (GTK 3.24.41; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: BIKJZART3H3EXWAVSANAG2SFRMVJ5DU7 X-Message-ID-Hash: BIKJZART3H3EXWAVSANAG2SFRMVJ5DU7 X-MailFrom: sbrivio@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: passt-dev@passt.top X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Fri, 26 Jul 2024 10:00:56 +0200 Stefano Brivio wrote: > On Fri, 26 Jul 2024 17:20:29 +1000 > David Gibson wrote: > > > Currently we set EPOLLET (edge trigger) on the epoll flags for the > > connected Qemu Unix socket. It's not clear that there's a reason for > > doing this: for TCP sockets we need to use EPOLLET, because we leave data > > in the socket buffers for our flow control handling. That consideration > > doesn't apply to the way we handle the qemu socket however. > > It significantly decreases epoll_wait() overhead on sustained data > transfers, because we can read multiple TAP_BUF_SIZE buffers at a time > instead of just one. > > I can check that now again with current QEMU and kernel versions, plus > several fundamental changes in buffer handling, but I don't see a real > reason why this shouldn't have changed meanwhile. Surprisingly, this doesn't affect throughput at all on my setup, no matter the packet size. I didn't check with perf(1), though, and we probably should give all the recent substantial changes a pass with it (it's been a while since I last checked where overhead typically is...). -- Stefano