Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1640046ybl; Wed, 18 Dec 2019 23:58:43 -0800 (PST) X-Google-Smtp-Source: APXvYqylX5/PVteBBDmem9FZFW1eWep7nj/YaIkPU4n/Vfhj3Qg4RrwM9b7gcpFlEWs/9UdHqQkg X-Received: by 2002:a9d:67d2:: with SMTP id c18mr7224073otn.362.1576742322937; Wed, 18 Dec 2019 23:58:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576742322; cv=none; d=google.com; s=arc-20160816; b=0A/FowwGL0b/7f4TLk3HbGhUF1JCgS5G2jNGnPM4dbdO4Fd120Njc87zqzPlf5r3tQ MLMWOAKW4JQGWdLr2Ojx1UJKd4DXDKYmVdCExtcWhBNaqGNAjDqg/0XcUqL4+2YkoJ4l ET894WhzIuh3W8ZXLl3i8oC18MwAioJT4NvZGGY3CIUqatSDmG01gBGSE43Z4zztWpVp cMy+RSkgg3FyYFbm2yD7FsPCCeeB60L+7Rfea0xmMNehClB6Q2LA/1Fr/TKdxboL1jt9 lboJIojT/zwjpK74itpD09agZcvU1WTsx9+UcytGoYvu2o6aAurXrnV9Kg6cuPVfLSd7 7dhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=PYvhhfdfRXcH4jO+EP53VpwP3E/K4rAyanO/djc7fbc=; b=I7BS6HHZlYgDY2xHa7xZvWgaCtf0yt69f3NFb8Fwpqi3WOgjHujcsvS1qbCD9XTMVJ IkZfcMtj/Dus/5UiPOwt1FrHFGqJQNJ83FAr1vmKkIN0RjkFGf2CgHrTQHNK0AWcBJ9M sI49AaD+TKodMZSKY7y6Lw5VWeCERW/5HPHUkTEPQ3z7LWiqsJiTS+xbqYg/aq+KTcGD bKG+XskbAk7x+2cA8B9r40cDfu79xKQpYeVMl7axsPGmyamyUu+joo8wLQmL7dTUOxpe 9MVpwlLIugHWMZ8ac7U8TemENy+My8fjqnkGy4KG7FhTza874xkfnhr5b+t7wQEQZLyU 0N2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=NLK+2FLn; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v21si3647522otf.87.2019.12.18.23.58.29; Wed, 18 Dec 2019 23:58:42 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=NLK+2FLn; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726683AbfLSH5k (ORCPT + 99 others); Thu, 19 Dec 2019 02:57:40 -0500 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:44432 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726439AbfLSH5j (ORCPT ); Thu, 19 Dec 2019 02:57:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576742258; 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=PYvhhfdfRXcH4jO+EP53VpwP3E/K4rAyanO/djc7fbc=; b=NLK+2FLnx6EcnNM1kSfE2NzbPJG+sSIplXoWdFFKvB8kHe07AfLWKn47EAeG+CCru2QaKS cld2L5fnVWHKX4ua8I0ZL616YzgpVL/qENW8lWvIDY1CeAUmTwjP5JvA1l6hjtmyGZ9x4Y RhEATXSbaiviHhS7xLL2RNNf5zAIVig= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-287-UkhMKIxTMPm8eSJTniRGqw-1; Thu, 19 Dec 2019 02:57:32 -0500 X-MC-Unique: UkhMKIxTMPm8eSJTniRGqw-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id DDB2A107ACE3; Thu, 19 Dec 2019 07:57:28 +0000 (UTC) Received: from carbon (ovpn-200-37.brq.redhat.com [10.40.200.37]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4B0861000330; Thu, 19 Dec 2019 07:57:24 +0000 (UTC) Date: Thu, 19 Dec 2019 08:57:22 +0100 From: Jesper Dangaard Brouer To: David Laight Cc: 'Marek Majkowski' , linux-kernel , network dev , kernel-team , Paolo Abeni , brouer@redhat.com Subject: Re: epoll_wait() performance Message-ID: <20191219085722.23e39028@carbon> In-Reply-To: References: <5f4028c48a1a4673bd3b38728e8ade07@AcuMS.aculab.com> <20191127164821.1c41deff@carbon> <5eecf41c7e124d7dbc0ab363d94b7d13@AcuMS.aculab.com> <20191128121205.65c8dea1@carbon> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 28 Nov 2019 16:37:01 +0000 David Laight wrote: > From: Jesper Dangaard Brouer > > Sent: 28 November 2019 11:12 > ... > > > Can you test recv() as well? > > > > Sure: https://github.com/netoptimizer/network-testing/commit/9e3c8b86a2d662 > > > > $ sudo taskset -c 1 ./udp_sink --port 9 --count $((10**6*2)) > > run count ns/pkt pps cycles payload > > recvMmsg/32 run: 0 2000000 653.29 1530704.29 2351 18 demux:1 > > recvmsg run: 0 2000000 631.01 1584760.06 2271 18 demux:1 > > read run: 0 2000000 582.24 1717518.16 2096 18 demux:1 > > recvfrom run: 0 2000000 547.26 1827269.12 1970 18 demux:1 > > recv run: 0 2000000 547.37 1826930.39 1970 18 demux:1 > > > > > I think it might be faster than read(). > > > > Slightly, but same speed as recvfrom. > > I notice that you recvfrom() code doesn't request the source address. > So is probably identical to recv(). Created a GitHub issue/bug on this: https://github.com/netoptimizer/network-testing/issues/5 Feel free to fix this and send a patch/PR. -- Best regards, Jesper Dangaard Brouer MSc.CS, Principal Kernel Engineer at Red Hat LinkedIn: http://www.linkedin.com/in/brouer