linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Vivek Anand <vivekanand754@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Peter Zijlstra <peterz@infradead.org>,
	Bagas Sanjaya <bagasdotme@gmail.com>,
	Pablo Neira Ayuso <pablo@netfilter.org>,
	Jozsef Kadlecsik <kadlec@netfilter.org>,
	Florian Westphal <fw@strlen.de>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Lingutla Chandrasekhar <clingutla@codeaurora.org>,
	Frederic Weisbecker <frederic@kernel.org>,
	"J. Avila" <elavila@google.com>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Thomas Renninger <trenn@suse.com>, Shuah Khan <shuah@kernel.org>,
	Borislav Petkov <bp@alien8.de>,
	Josh Poimboeuf <jpoimboe@kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Regressions <regressions@lists.linux.dev>,
	Linux Netfilter Development <netfilter-devel@vger.kernel.org>,
	Netfilter Core Developers <coreteam@netfilter.org>,
	Linux Networking <netdev@vger.kernel.org>,
	Linux Power Management <linux-pm@vger.kernel.org>,
	x86@kernel.org
Subject: Re: High cpu usage caused by kernel process when upgraded to linux 5.19.17 or later
Date: Thu, 6 Jul 2023 12:33:00 -0400	[thread overview]
Message-ID: <20230706123300.55d6450b@gandalf.local.home> (raw)
In-Reply-To: <CAJnqnX5dHiXe3smKhj6JT9+6FNdgrAR=5_Hm8BSRpVF3uARYUg@mail.gmail.com>

On Mon, 3 Jul 2023 18:23:25 +0530
Vivek Anand <vivekanand754@gmail.com> wrote:

> Hi Thomas,
> 
> Further analyzing, I found that I did set
> "CONFIG_NETFILTER_XT_MATCH_LIMIT=m" in my kernel config earlier which was
> causing high CPU consumption.
> Setting it to "CONFIG_NETFILTER_XT_MATCH_LIMIT=n" resolved the high CPU
> issue.
> 
> 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 = 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_interval));
}

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


> 
> Thanks,
> Vivek
> 
> On Thu, Jun 29, 2023 at 7:48 PM Thomas Gleixner <tglx@linutronix.de> wrote:
> 
> > On Thu, Jun 29 2023 at 12:05, Vivek Anand wrote:
> > > I've tried booting with "spectre_v2=retpoline retbleed=off".
> > > This change didn't work. Still CPU is 100%
> >
> > This does not make sense.
> >
> > retbleed=off has the same effect as CONFIG_X86_IBRS_ENTRY=n.
> >
> > The only difference is that with CONFIG_X86_IBRS_ENTRY=y and
> > retbleed=off 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=retpoline retbleed=off" ?
> >
> > Thanks,
> >
> >         tglx
> >


  parent reply	other threads:[~2023-07-06 16:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-23  0:58 Fwd: High cpu usage caused by kernel process when upgraded to linux 5.19.17 or later Bagas Sanjaya
2023-06-23  1:26 ` Steven Rostedt
2023-06-27  2:29 ` Fwd: " Bagas Sanjaya
2023-06-27  7:30   ` Peter Zijlstra
2023-06-27 10:15     ` Bagas Sanjaya
2023-06-27 10:19       ` Peter Zijlstra
     [not found]         ` <CAJnqnX5rYn65zVQ+SLN4m4ZzM_jOa_RjGhazWO=Fh8ZvdOCadg@mail.gmail.com>
2023-06-29 14:18           ` Thomas Gleixner
     [not found]             ` <CAJnqnX5dHiXe3smKhj6JT9+6FNdgrAR=5_Hm8BSRpVF3uARYUg@mail.gmail.com>
2023-07-06 16:33               ` Steven Rostedt [this message]
2023-10-20 10:55 ` Linux regression tracking #update (Thorsten Leemhuis)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230706123300.55d6450b@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=bagasdotme@gmail.com \
    --cc=bp@alien8.de \
    --cc=clingutla@codeaurora.org \
    --cc=coreteam@netfilter.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=elavila@google.com \
    --cc=frederic@kernel.org \
    --cc=fw@strlen.de \
    --cc=jpoimboe@kernel.org \
    --cc=kadlec@netfilter.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pablo@netfilter.org \
    --cc=peterz@infradead.org \
    --cc=rafael@kernel.org \
    --cc=regressions@lists.linux.dev \
    --cc=shuah@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=trenn@suse.com \
    --cc=vivekanand754@gmail.com \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).