The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Eric Dumazet <edumazet@google.com>
Cc: Mateusz Guzik <mjguzik@gmail.com>,
	kernel test robot <oliver.sang@intel.com>,
	oe-lkp@lists.linux.dev, lkp@intel.com,
	linux-kernel@vger.kernel.org, x86@kernel.org,
	Benjamin Segall <bsegall@google.com>,
	Frederic Weisbecker <frederic@kernel.org>
Subject: Re: [tip:timers/core] [posix] 1535cb8028: stress-ng.epoll.ops_per_sec 36.2% regression
Date: Thu, 27 Mar 2025 11:50:40 +0100	[thread overview]
Message-ID: <87v7ruycfz.ffs@tglx> (raw)
In-Reply-To: <CANn89i+nAN+p-qRypKxB4ESohXkKVPmHuV_m86j3DPv6_+C=oQ@mail.gmail.com>

On Thu, Mar 27 2025 at 10:11, Eric Dumazet wrote:
> On Thu, Mar 27, 2025 at 9:26 AM Eric Dumazet <edumazet@google.com> wrote:
>
>> We could place all these atomic fields in separate cache lines,
>> to keep read-only fields shared as much as possible.
>>
>
> Following one-liner seems good enough to separate the 4 atomics used
> to control/limit
>
> UCOUNT_RLIMIT_NPROC, UCOUNT_RLIMIT_MSGQUEUE, UCOUNT_RLIMIT_SIGPENDING,
> UCOUNT_RLIMIT_MEMLOCK,
>
>
> diff --git a/include/linux/user_namespace.h b/include/linux/user_namespace.h
> index 7183e5aca282..6cc3fbec3632 100644
> --- a/include/linux/user_namespace.h
> +++ b/include/linux/user_namespace.h
> @@ -120,7 +120,7 @@ struct ucounts {
>         kuid_t uid;
>         atomic_t count;
>         atomic_long_t ucount[UCOUNT_COUNTS];
> -       atomic_long_t rlimit[UCOUNT_RLIMIT_COUNTS];
> +       atomic_long_t ____cacheline_aligned_in_smp rlimit[UCOUNT_RLIMIT_COUNTS];
>  };

Cute. How much bloat does it cause?

  reply	other threads:[~2025-03-27 10:50 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-24  6:39 [tip:timers/core] [posix] 1535cb8028: stress-ng.epoll.ops_per_sec 36.2% regression kernel test robot
2025-03-26  8:07 ` Thomas Gleixner
2025-03-26 21:11   ` Mateusz Guzik
2025-03-26 21:43     ` Thomas Gleixner
2025-03-27  6:21     ` Eric Dumazet
2025-03-27  8:10       ` Thomas Gleixner
2025-03-27  8:26         ` Eric Dumazet
2025-03-27  9:11           ` Eric Dumazet
2025-03-27 10:50             ` Thomas Gleixner [this message]
2025-03-27 11:37               ` Eric Dumazet
2025-03-27 13:14                 ` Thomas Gleixner
2025-03-27 13:17                   ` Eric Dumazet
2025-03-27 13:43                     ` Mateusz Guzik
2025-03-27 13:44                       ` Eric Dumazet
2025-03-27 13:48                         ` Mateusz Guzik
2025-03-27 20:45                           ` David Laight

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=87v7ruycfz.ffs@tglx \
    --to=tglx@linutronix.de \
    --cc=bsegall@google.com \
    --cc=edumazet@google.com \
    --cc=frederic@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=mjguzik@gmail.com \
    --cc=oe-lkp@lists.linux.dev \
    --cc=oliver.sang@intel.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