Received: by 10.223.176.46 with SMTP id f43csp943487wra; Wed, 24 Jan 2018 08:12:53 -0800 (PST) X-Google-Smtp-Source: AH8x227BYUdBXdcQbUgdMoDhyIoPQFMfQV/c59Dgt//V5K94nYjpUvAF+J1NYVxAExBDsCccqBwz X-Received: by 10.98.139.8 with SMTP id j8mr13586043pfe.4.1516810372912; Wed, 24 Jan 2018 08:12:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516810372; cv=none; d=google.com; s=arc-20160816; b=w8OnAOF0YT5ahWQAUk0DW+ioPRzQaTwkc4Aw6ZLWpstUCfDSzZ0Vo1EBy5oLlBIeJt OCuykvv93eYnX+z2JR9jI2YNPu98ZwO1qA52DiofMXEtyxlz0k8k956O6DV8e9rS7+83 j9CxL7lHj5c8jhiL6FcEfdOmhGZ9ys/omseaolSrnEUAY2serIcgqVhnlq408Bq1itis +1nq3BsPTTx1heexecpWjWG0n/G5sxLb4a6rI82l1zuEoOfs3RdZkz9WqQT31kSjYkxh m1qhp3snNQ/JESnAG1tEcQwHjZY1BMiuj07AzlGN55p8ooZevZ/7w058kJsXELsYUiOs HnYQ== 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:date:cc:to:from:subject:message-id :arc-authentication-results; bh=GazusIpaqEW36XuJ731INFVeE+uz6O9OjWPbQ/sxEBQ=; b=sJqGzWMEHlFOUkN8gCJD2OZ3h+7sz0l8alzyViuoL4KkzvjU0hbJx0S+Txk5P5PA+Q Z3a3Xuj9Ng+/E52bKFG+/f4gmo9Pn0itiJ3jJHBJHKzAUuzj/jx4gea8SKt3abGgEsvR emTbkY6Fcfu5EFFDTjHEVyMH5TBPymUrVfA2G5ReHlD9ro8uU/AK5RKrRdFfGBm5xGKz lnJPtd2eXzzp5p4bTE0wav41YGtHv2TdPRF9kUJ6NhVmIEGgYhCFJUIhUiLzlPb5QwA3 SPcrX9k85S0vwF+lnNmhO2p3GkRscyVG1ltd48MjPMBLr5UtsqxEBYFGIKcws/5tg02h Jn1A== 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; dmarc=fail (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 t80si3122530pfa.29.2018.01.24.08.12.38; Wed, 24 Jan 2018 08:12:52 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934274AbeAXQLV (ORCPT + 99 others); Wed, 24 Jan 2018 11:11:21 -0500 Received: from mx1.redhat.com ([209.132.183.28]:44112 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934021AbeAXQLU (ORCPT ); Wed, 24 Jan 2018 11:11:20 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9A4D0C047B89; Wed, 24 Jan 2018 16:11:19 +0000 (UTC) Received: from localhost.localdomain (unknown [10.32.181.99]) by smtp.corp.redhat.com (Postfix) with ESMTP id D9EC25D6A8; Wed, 24 Jan 2018 16:11:12 +0000 (UTC) Message-ID: <1516810271.2476.43.camel@redhat.com> Subject: Re: [RFC PATCH 0/4] softirq: Per vector threading v3 From: Paolo Abeni To: David Miller Cc: torvalds@linux-foundation.org, frederic@kernel.org, linux-kernel@vger.kernel.org, alexander.levin@verizon.com, peterz@infradead.org, mchehab@s-opensource.com, hannes@stressinduktion.org, paulmck@linux.vnet.ibm.com, wanpeng.li@hotmail.com, dima@arista.com, tglx@linutronix.de, akpm@linux-foundation.org, rrendec@arista.com, mingo@kernel.org, sgruszka@redhat.com, riel@redhat.com, edumazet@google.com, nks.gnu@gmail.com Date: Wed, 24 Jan 2018 17:11:11 +0100 In-Reply-To: <20180124.100558.97132829347179555.davem@davemloft.net> References: <1516726652.2554.58.camel@redhat.com> <1516805645.2476.23.camel@redhat.com> <20180124.100558.97132829347179555.davem@davemloft.net> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Wed, 24 Jan 2018 16:11:20 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2018-01-24 at 10:05 -0500, David Miller wrote: > From: Paolo Abeni > Date: Wed, 24 Jan 2018 15:54:05 +0100 > > > Niklas suggested a possible relation with CONFIG_IRQ_TIME_ACCOUNTING=y > > and indeed he was right. > > > > The patched kernel under test had CONFIG_IRQ_TIME_ACCOUNTING set, and > > very little CPU time was accounted to the kworker: > > > > [2125 is the relevant kworker's pid] > > grep sum_exec_runtime /proc/2125/sched; sleep 10; grep sum_exec_runtime /proc/2125/sched > > se.sum_exec_runtime : 13408.239286 > > se.sum_exec_runtime : 13456.907197 > > > > despite such process was processing a lot of packets and basically > > burning a CPU. > > So IRQ_TIME_ACCOUNTING makes the scheduler think that the worker > threads are using nearly no task time at all. Yes, this is the behavior I observe in the test. But a quick look at the scheduler code - I'm not very familiar with it - let me think this is not the intended/expected behaviour for the ksoftirqd (and after this series, for the kworker serving the softirq). > The existing ksoftirqd code should hit the same problem, right? I just tried the vanilla kernel with CONFIG_IRQ_TIME_ACCOUNTING=y, and in the same test scenario, I observe the 'good' behavior: the user space process and ksoftirqd share almost fairly the relevant CPU, and the CPU time spend in softirq processing is accounted to ksoftirqd. Cheers, Paolo