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 8CE6F33E2; Thu, 6 Jul 2023 16:33:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4518EC433C7; Thu, 6 Jul 2023 16:33:03 +0000 (UTC) Date: Thu, 6 Jul 2023 12:33:00 -0400 From: Steven Rostedt To: Vivek Anand Cc: Thomas Gleixner , Peter Zijlstra , Bagas Sanjaya , Pablo Neira Ayuso , Jozsef Kadlecsik , Florian Westphal , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Lingutla Chandrasekhar , Frederic Weisbecker , "J. Avila" , "Rafael J. Wysocki" , Thomas Renninger , Shuah Khan , Borislav Petkov , Josh Poimboeuf , Linux Kernel Mailing List , Linux Regressions , Linux Netfilter Development , Netfilter Core Developers , Linux Networking , Linux Power Management , x86@kernel.org Subject: Re: High cpu usage caused by kernel process when upgraded to linux 5.19.17 or later Message-ID: <20230706123300.55d6450b@gandalf.local.home> In-Reply-To: References: <01ac399d-f793-49d4-844b-72cd8e0034df@gmail.com> <20230627073035.GV4253@hirez.programming.kicks-ass.net> <99b64dfd-be4a-2248-5c42-8eb9197824e1@gmail.com> <20230627101939.GZ4253@hirez.programming.kicks-ass.net> <878rc22vxq.ffs@tglx> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Mon, 3 Jul 2023 18:23:25 +0530 Vivek Anand wrote: > Hi Thomas, >=20 > Further analyzing, I found that I did set > "CONFIG_NETFILTER_XT_MATCH_LIMIT=3Dm" in my kernel config earlier which w= as > causing high CPU consumption. > Setting it to "CONFIG_NETFILTER_XT_MATCH_LIMIT=3Dn" resolved the high CPU > issue. >=20 > Is there any suggestion regarding the use of this config > "CONFIG_NETFILTER_XT_MATCH_LIMIT" as I'm getting high CPU by setting it to > "m" ? That config enables the compiling of: net/netfilter/xt_limit.c The htable_gc that you reported is defined in: net/netfilter/xt_hashlimit.c It has: static void htable_gc(struct work_struct *work) { struct xt_hashlimit_htable *ht; ht =3D container_of(work, struct xt_hashlimit_htable, gc_work.work); htable_selective_cleanup(ht, false); queue_delayed_work(system_power_efficient_wq, &ht->gc_work, msecs_to_jiffies(ht->cfg.gc_interv= al)); } So it queues itself every ht->cfg.gc_interval msecs. That variable seems to come from some configuration of netfilter, and I think you can see these in: find /proc/sys/net -name 'gc_interval' Perhaps you have it set off to go too much? -- Steve >=20 > Thanks, > Vivek >=20 > On Thu, Jun 29, 2023 at 7:48=E2=80=AFPM Thomas Gleixner wrote: >=20 > > On Thu, Jun 29 2023 at 12:05, Vivek Anand wrote: > > > I've tried booting with "spectre_v2=3Dretpoline retbleed=3Doff". > > > This change didn't work. Still CPU is 100% > > > > This does not make sense. > > > > retbleed=3Doff has the same effect as CONFIG_X86_IBRS_ENTRY=3Dn. > > > > The only difference is that with CONFIG_X86_IBRS_ENTRY=3Dy and > > retbleed=3Doff there is one extra jump in the low level entry code > > (syscall, interrupts, exceptions) and one extra jump on the exit side. > > > > But those extra jumps are completely irrelevant for the kworker threads. > > > > Can you please provide dmesg and the content of the files in > > > > /sys/devices/system/cpu/vulnerabilities/ > > > > on a kernel booted with "spectre_v2=3Dretpoline retbleed=3Doff" ? > > > > Thanks, > > > > tglx > >