Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp919579imm; Wed, 19 Sep 2018 08:59:33 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdb1eMN+y5OI0pKmo+/KQuAouwQkwiwTv2fy1jUf2du4tA+1m0zQj+gTDC2uO/Oh/OBvMbOk X-Received: by 2002:a63:db15:: with SMTP id e21-v6mr33246003pgg.418.1537372773040; Wed, 19 Sep 2018 08:59:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537372773; cv=none; d=google.com; s=arc-20160816; b=auXLeaoag977U7ftuAuWYGIdJcYMJVHfvAT18k8wfLhb3VIXnHSiEAV0XyTCKpWzc0 YyVhtEwwL16mJhl01ClOYGFvJvl00uqu4xXUaj/9KqmWejRRGyNaP6bVF8gi+NYaEehP 3Cym0uPDpDSqcPlM/0HjTUqJHMWTlzsddpNYeTfq3W1VeWNh8vZQiP58X6b1RwXNTgwn lLCUDy3JDlAz5LkJGMVJgpFI4eJt8cACui3FVT5pBiNpcedzeJjYFwux7mDHjCiL9bxT pSIfd+xdiOR9qsECgF+6iuHoFQuIsiCeKr9jlykPs4pPir7NjuRg03pTC/LfANuw/8DM iTqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=AiOF7ixpQm/r73fCn/deRNrbOtx1l/vk8tHNn3Ge9kc=; b=GGBSS0fWyfWRkRtKAeonbNCMQilbtJFM26FqOKSiQoVQXklkhV1GiN/7lCW+pReXH7 h7ph53T5+STPeMkQffWOS6Q+EHcweD/qWGqqU181xvAAuPnbL/FD9XFILlbOO1QWpArA 5Cp7PwB+7BYwefVcjP1tTwy0CMhpF2Z97+BnP36i9P+Uib6D1jNBTlULtLjijX7LdKKX Tc3/dRuX0Q5gDWfgDyFlpxlqoqVL84bk6M2ShFuTz+qVeT4GRmSqSItecHwPVi3ALZ26 VZ3SOsRvfam33itIArn0Acd3qPISvCZiDn6T4pztjMcokx7cOEpG/Jsv94tt9mUi63zU n0lg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=YzdzGboO; 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=virtuozzo.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id az1-v6si20724208plb.513.2018.09.19.08.59.16; Wed, 19 Sep 2018 08:59:33 -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; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=YzdzGboO; 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=virtuozzo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732646AbeISVh0 (ORCPT + 99 others); Wed, 19 Sep 2018 17:37:26 -0400 Received: from mail-eopbgr10118.outbound.protection.outlook.com ([40.107.1.118]:21584 "EHLO EUR02-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1732492AbeISVh0 (ORCPT ); Wed, 19 Sep 2018 17:37:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=AiOF7ixpQm/r73fCn/deRNrbOtx1l/vk8tHNn3Ge9kc=; b=YzdzGboOTFnkjKnyyH/XOcNHPi7K9WdoFseXGlOUkRvM6GXd/2I2NXlYgtucbffzmn1zD6Gu2DDHUFx4ixnEAN/JhWc8TmRrva/zIqv0EWEfdIyFyVXvLIAQWRXbjCsh0vymjPyM6gXpLkZze/KJIKu+mSweb9r+2AKyOx/PJiE= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=ktkhai@virtuozzo.com; Received: from [172.16.25.169] (185.231.240.5) by DB6PR0801MB2021.eurprd08.prod.outlook.com (2603:10a6:4:76::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1143.17; Wed, 19 Sep 2018 15:58:46 +0000 Subject: Re: [RFC] net;sched: Try to find idle cpu for RPS to handle packets To: Eric Dumazet Cc: Peter Zijlstra , David Miller , Daniel Borkmann , tom@quantonium.net, netdev , LKML References: <153736009982.24033.13696245431713246950.stgit@localhost.localdomain> <2fdf2bd7-1cc4-a1e1-15c2-e2badfcd4d59@virtuozzo.com> From: Kirill Tkhai Message-ID: <84d38f11-2133-9d34-e468-d2ef16715f49@virtuozzo.com> Date: Wed, 19 Sep 2018 18:58:44 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [185.231.240.5] X-ClientProxiedBy: AM5PR0102CA0036.eurprd01.prod.exchangelabs.com (2603:10a6:206::49) To DB6PR0801MB2021.eurprd08.prod.outlook.com (2603:10a6:4:76::14) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 379f37ea-68ba-41a2-a50e-08d61e48c8d7 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(4534165)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060)(7193020);SRVR:DB6PR0801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NiUV+ZZUQCTuFiascFuODnWf/k1OGbhVsVt4HJWEFb69/6QXCnUk18Z06lbsnzxCxI9lEFMOpIIN+CaEJEq0rnVcpMsOVj440/HFx+poWQzNUENbiz7iSTKY66fxKeuBm/qVqpGHkCSxxOCzjAivZPxJOJs+tsAG4sUv5BYnRBe8KObHdvG3YpXYTcfYew9zaspNYwZ0/ynzjfNRSyAI37JUhWOCFg9dfYJjxJ0bnOnxoysyBYnbfSXlS7AVv4hSJ3mbVM2zHkRO0HFIzd1Ehu5q0gclXIrbQLxnqHX70XxbMxzYLcVur9fTEIE0SkND9sFHld4oO91xUML8r/MMdvNYwSr5JYjMmQ5GnHWvIa3gqFxZqsTZykUckigsb+K703vtFDhSUQ9;4:TDpdakxZUg5uNjoIPKWKbcJci6o4Z9n5uefhoLCxaZ0iWpknXHFEFWHUu4TdFGlHTfhSGvY3HEnTxCmI5WigOjr1C53xaheYVwZQuTnZMPr2PM2+Q0wOtFSpjcYoAOpiWdv3ZI0WER5DMqOPTb0K9sVyPKxNh0GyL0TfqTD3ttoclSwlReUUJ0utPsWmXoO+a5IN+Eo4i2FIbwrrotM/Lv+JGZHn3zT3BhEDCUFS6dtIDzq1uSs9tNsutR+3MpzsDbTBAUzacIiu1KgjEAUFtUZBDoeSGhj6ja6EDDxWhWuPjf7XorGBAMOFhVPLBBrwx7ib7oy7ioyxn09LOHIQM/K6EjMZAVQRtmTW1FXmU9I= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(209352067349851)(269456686620040); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040522)(2401047)(8121501046)(5005006)(3002001)(10201501046)(93006095)(93001095)(3231355)(944501410)(52105095)(149027)(150027)(6041310)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(20161123560045)(201708071742011)(7699050);SRVR:DB6PR0801MB2021;BCL:0;PCL:0;RULEID:;SRVR:DB6PR0801MB2021; X-Forefront-PRVS: 0800C0C167 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6049001)(396003)(366004)(39850400004)(346002)(376002)(136003)(199004)(189003)(64126003)(4326008)(23676004)(8676002)(47776003)(16576012)(58126008)(54906003)(93886005)(50466002)(6486002)(77096007)(26005)(65826007)(3846002)(305945005)(25786009)(5660300001)(956004)(229853002)(52116002)(52146003)(53546011)(386003)(6246003)(446003)(6116002)(2486003)(11346002)(316002)(2616005)(7736002)(81166006)(486006)(68736007)(105586002)(76176011)(5024004)(66066001)(86362001)(186003)(65806001)(31696002)(53936002)(97736004)(36756003)(31686004)(16526019)(2906002)(65956001)(478600001)(8936002)(81156014)(230700001)(106356001)(6916009)(476003)(37363001);DIR:OUT;SFP:1102;SCL:1;SRVR:DB6PR0801MB2021;H:[172.16.25.169];FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; Received-SPF: None (protection.outlook.com: virtuozzo.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtEQjZQUjA4MDFNQjIwMjE7MjM6WW9xaXRFVnNzWE9CaWlDL3VSa2tCSks5?= =?utf-8?B?TjB6ck5ncHIzKzN0SXhwVUVUekdwQjQyZWttMFVIMjdUeWZTNGp0YjdOUitl?= =?utf-8?B?UU80LzNsV3A0L1BhMFdaWkZnc0RDWktXdFE1dlQydjBUVFJpUmZ6Uit1NGpU?= =?utf-8?B?R2hYTlJvOHhnQ3hBQVpsYWVRMytNbEhDOXZQWjc1eTdhQXYrb2RnZFRyaU92?= =?utf-8?B?WFc5dXNuRHl2aEloMUFBeDlSRmR6bG1mcm1za1UyZUpWQ3ZlNVduZzZkRVox?= =?utf-8?B?YmthUzE5Z0h5T0w3b25wRDBzdmJhM0RwcDQ2RlAyRStES1NtTzIyVWtHQjdC?= =?utf-8?B?MWQ5MEFsOTBxazQyQkpIODRMWjY5LzZBVW4wUjlaaFJBL3FSWUw0YlM1WE1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I+pskr+gF9 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;DB6PR0801MB2021;20:/4/dtXdLTnF0Tiqktb++BkUwXQ5IpRo4p0R1jBQDhsAdD4u8NdXH5hH5I2nTjbp8p9LQPcfQFo6TdfqWsrrsiaEA+hbji0xTGx40sFbvQFF0pyn0aHmfncsBTYz41uD7hyV9PWd/Jz9o12cBA5tpmbNIasnxevm7TrNj319QOcs= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Sep 2018 15:58:46.9673 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 379f37ea-68ba-41a2-a50e-08d61e48c8d7 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0801MB2021 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19.09.2018 18:49, Eric Dumazet wrote: > On Wed, Sep 19, 2018 at 8:41 AM Kirill Tkhai wrote: >> >> On 19.09.2018 17:55, Eric Dumazet wrote: >>> On Wed, Sep 19, 2018 at 5:29 AM Kirill Tkhai wrote: >>>> >>>> Many workloads have polling mode of work. The application >>>> checks for incomming packets from time to time, but it also >>>> has a work to do, when there is no packets. This RFC >>>> tries to develop an idea to queue RPS packets on idle >>>> CPU in the the L3 domain of the consumer, so backlog >>>> processing of the packets and the application can execute >>>> in parallel. >>>> >>>> We require this in case of network cards does not >>>> have enough RX queues to cover all online CPUs (this seems >>>> to be the most cards), and get_rps_cpu() actually chooses >>>> remote cpu, and SMP interrupt is sent. Here we may try >>>> our best, and to find idle CPU nearly the consumer's CPU. >>>> Note, that in case of consumer works in poll mode and it >>>> does not waits for incomming packets, its CPU will be not >>>> idle, while CPU of a sleeping consumer may be idle. So, >>>> not polling consumers will still be able to have skb >>>> handled on its CPU. >>>> >>>> In case of network card has many queues, the device >>>> interrupts will come on consumer's CPU, and this patch >>>> won't try to find idle cpu for them. >>>> >>>> I've tried simple netperf test for this: >>>> netserver -p 1234 >>>> netperf -L 127.0.0.1 -p 1234 -l 100 >>>> >>>> Before: >>>> 87380 16384 16384 100.00 60323.56 >>>> 87380 16384 16384 100.00 60388.46 >>>> 87380 16384 16384 100.00 60217.68 >>>> 87380 16384 16384 100.00 57995.41 >>>> 87380 16384 16384 100.00 60659.00 >>>> >>>> After: >>>> 87380 16384 16384 100.00 64569.09 >>>> 87380 16384 16384 100.00 64569.25 >>>> 87380 16384 16384 100.00 64691.63 >>>> 87380 16384 16384 100.00 64930.14 >>>> 87380 16384 16384 100.00 62670.15 >>>> >>>> The difference between best runs is +7%, >>>> the worst runs differ +8%. >>>> >>>> What do you think about following somehow in this way? >>> >>> Hi Kirill >>> >>> In my experience, scheduler has a poor view of softirq processing >>> happening on various cpus. >>> A cpu spending 90% of its cycles processing IRQ might be considered 'idle' >> >> Yes, in case of there is softirq on top of irq_exit(), the cpu is not >> considered as busy. But after MAX_SOFTIRQ_TIME (=2ms), ksoftirqd are >> waken up to execute the work in process context, and the processor is >> considered as !idle. 2ms is 2 timer ticks in case of HZ=1000. So, we >> don't restart softirq in case of it was executed for more then 2ms. >> > > That's the theory, but reality is very different unfortunately. > > If RFS/RPS is setup properly, we really do not hit MAX_SOFTIRQ_TIME condition > unless in some synthetic benchmarks maybe. > >> The similar way, single net_rx_action() can't be executed longer >> than 2ms. >> >> Having 90% load in softirq (called on top of irq_exit()) should be >> very unlikely situation, when there are too many interrupts with small >> amount of work, which related softirq calls are doing for each of them. >> I think it had be a problem even in plain napi case, since it would >> worked not like expected. >> >> But anyway. You worry, that during handling of next portion of skbs, >> we find that previous portion of skbs already woken ksoftirqd, and >> we don't see this cpu as idle? Yeah, then we'll try to change cpu, >> and this is not what we want. We want to continue use the cpu, where >> previous portion was handler. Hm, not so fast I'll answer, but certainly, >> this may be handled somehow in more creative way. >> >>> So please run a real workload (it is _very_ uncommon anyone set up RPS >>> on lo interface !) >>> >>> Like 400 or more concurrent netperf -t TCP_RR on a 10Gbit NIC. >> >> Yeah, it's just a simulation of a single irq nic. I'll try on something >> more real hardware. > > Also my concern is that you might have results that are tied to a particular > version of process scheduling, platform, workload... > > One month later, a small change in process scheduler, > and very different results. Maybe, but especially that function logic has not changed for a long time. 10 years at least. The only change is Peter adds idle core searching functionality recently. > This is why I believe this new feature must be controllable, via a new > tunable (like RPS/RFS are controllable per rx queue) > >> >> How do you execute such the tests? I don't see the appropriate parameter >> of netperf. Does this mean just to start 400 copies of netperf? How is >> to aggregate their results in this case? > > Yeah, there are various 'super_netperf' scripts available on the net > (almost trivial to write anyway) > > ( I am attaching one of them) Thanks. > Thanks. >> >>> Thanks. >>> >>> PS: Idea of playing with L3 domains is interesting, I have personally >>> tried various strategies in the past but none of them >>> demonstrated a clear win. >> >> Thanks, >> Kirill