Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp3627748ybd; Tue, 25 Jun 2019 06:00:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqx6gb9D/NGj1TGJy6wuG+2SGdf+RY2fLE/2zGzLFsmKMwzkXxC1HdlLfEVzjq8zWgetBFPw X-Received: by 2002:a17:90a:8985:: with SMTP id v5mr31379192pjn.136.1561467622977; Tue, 25 Jun 2019 06:00:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561467622; cv=none; d=google.com; s=arc-20160816; b=zBu3u+yt6AMX4BK8XSxvOBjxe/tlP2+MbhbfgyQ/lP9FtYqjjIkxWzrZUUnL2nAwT8 ArwT8nOlcFfmIww1sJdldH720ZVjrzdjdWFImUPNo38KocxiYnthotL/rBv4DFpZsYP8 oueOzJhRq9epX+jxUjNa420/ZKMpYpRCCungpuS674Zs70PGhURqGWl5imYmv9EesHUe 6Btzp9DYerU520poxJNRIHGtAsxnZ/rh41bVQwETW3X7vZ+Pz320DYIqw4hqgbtbiaO1 SXkQn2JfjjKGJ09KEdm/CL3ndaehec5t21HKZvGhn0Q6dDZznZcVt4fiCb1dL/d/hzUq W4/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version; bh=H4zA7xHMj7WQ44FvACh5lFb67O+VbylPG5tTEMxN0Wc=; b=DXxDHpdl4oIL40pSx4rNDlcOW213PT+shnGe1gUwQ1ZZTsg69+8/6nBHgvNSiyeY0O s75k4jTc2hsyyJUUcMUsJDnQkCGnxXEFgGixcPNcGFYQZvgt/XBRAvrOTvFgJlfRccHn gtClS7feuyl/2+ZRB4HluNJvgfLVrRUDiW8wAtZHrZUhx8JtoqKomt0+XT+fxXOIffS6 Vn1l07KELNV1Xq4B7ii4eSAF13eg9njhksE5N7kSO6QbqQ1Hv3l/U10gY+BXZ8y0CDft EiIEiikUn9EUWO13rL4a+/IrNjguA4SLOe8jNm14QpFX3zAy9hLeAKCjtbBUN6y2C1Fy m4xQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u4si13804117pgk.48.2019.06.25.06.00.06; Tue, 25 Jun 2019 06:00:22 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730490AbfFYLTH (ORCPT + 99 others); Tue, 25 Jun 2019 07:19:07 -0400 Received: from mx2.suse.de ([195.135.220.15]:51812 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730461AbfFYLTH (ORCPT ); Tue, 25 Jun 2019 07:19:07 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id AD39FAEFF; Tue, 25 Jun 2019 11:19:05 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 25 Jun 2019 13:19:04 +0200 From: Roman Penyaev To: Linus Torvalds Cc: Andrew Morton , Al Viro , Peter Zijlstra , Azat Khuzhin , Eric Wong , linux-fsdevel , Linux List Kernel Mailing Subject: Re: [PATCH v5 00/14] epoll: support pollable epoll from userspace In-Reply-To: References: <20190624144151.22688-1-rpenyaev@suse.de> Message-ID: X-Sender: rpenyaev@suse.de User-Agent: Roundcube Webmail Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019-06-24 22:38, Linus Torvalds wrote: > On Mon, Jun 24, 2019 at 10:42 PM Roman Penyaev > wrote: >> >> So harvesting events from userspace gives 15% gain. Though bench_http >> is not ideal benchmark, but at least it is the part of libevent and >> was >> easy to modify. >> >> Worth to mention that uepoll is very sensible to CPU, e.g. the gain >> above >> is observed on desktop "Intel(R) Core(TM) i7-6820HQ CPU @ 2.70GHz", >> but on >> "Intel(R) Xeon(R) Silver 4110 CPU @ 2.10GHz" measurements are almost >> the >> same for both runs. > > Hmm. 15% may be big in a big picture thing, but when it comes to what > is pretty much a micro-benchmark, I'm not sure how meaningful it is. > > And the CPU sensitivity thing worries me. Did you check _why_ it > doesn't seem to make any difference on the Xeon 4110? Is it just > because at that point the machine has enough cores that you might as > well just sit in epoll() in the kernel and uepoll doesn't give you > much? Or is there something else going on? This http tool is a singlethreaded test, i.e. client and server work as a standalone processes and each has a single event thread for everything. According to what I saw there, is that events come slowly (or event loop acts faster?), so when time has come to harvest events there is nothing, we take a slow path and go to kernel in order to sleep. That does not explain the main "why", unfortunately. I would like to retest that adding more clients to the server, thus server is more likely to observe events in a ring, avoiding sleep. -- Roman