From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2E03F1951F for ; Wed, 24 May 2023 15:55:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A2355C433D2; Wed, 24 May 2023 15:55:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684943708; bh=G7hrmYUfR5yH+TUkKZbiSr0+uC7SrwgnrQMWWuggF8w=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=spoGVOuViLnttV2DaQj1HeCAivokOPr4vez+lwss4yCnFAXHSG1L5NFqDgGqqhG3+ p8tHWJSeJdfUTvGbAvXMvUhE2ojCbSwvV3C+33b6Oz5ZwUg7Tk619Gvi/GfNjk4je3 xti1sN0lWvHEB/g4nintWA7dEjC3sj3BcMoIJV0N1XdZnniesluvW5BExm4lxY/0hJ r/vVTMNZVqyYesPfSX3JwWRXd2tetekG2EdlcPU7rFExq9dKBcAR+BvDaQL2nF16Um TBQrJoooyaQi5z8mzgoGk3ZXAoWpl1XbUHA2xn0ZyYo+iTlB2i/yKcKkrTvCOFol9e szF9DkIzscmVw== Date: Wed, 24 May 2023 08:55:07 -0700 From: Jakub Kicinski To: Sebastian Andrzej Siewior Cc: netdev@vger.kernel.org, Eric Dumazet , Kurt Kanzenbach , Paolo Abeni , Thomas Gleixner Subject: Re: [RFC PATCH 1/2] net: Add sysfs files for threaded NAPI. Message-ID: <20230524085507.3f38c758@kernel.org> In-Reply-To: <20230524111259.1323415-2-bigeasy@linutronix.de> References: <20230524111259.1323415-1-bigeasy@linutronix.de> <20230524111259.1323415-2-bigeasy@linutronix.de> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Wed, 24 May 2023 13:12:58 +0200 Sebastian Andrzej Siewior wrote: > I've been looking into threaded NAPI. One awkward thing to do is > to figure out the thread names, pids in order to adjust the thread > priorities and SMP affinity. > On PREEMPT_RT the NAPI thread is treated (by the user) the same way as > the threaded interrupt which means a dedicate CPU affinity for the > thread and a higher task priority to be favoured over other tasks on the > CPU. Otherwise the NAPI thread can be preempted by other threads leading > to delays in packet delivery. > Having to run ps/ grep is awkward to get the PID right. It is not easy > to match the interrupt since there is no obvious relation between the > IRQ and the NAPI thread. > NAPI threads are enabled often to mitigate the problems caused by a > "pending" ksoftirqd (which has been mitigated recently by doing softiqrs > regardless of ksoftirqd status). There is still the part that the NAPI > thread does not use softnet_data::poll_list. This needs to go to the netdev netlink family, not sysfs. There's much more information about NAPI to expose and sysfs will quickly start showing its limitations.