From: Alex Kogan <alex.kogan@oracle.com>
To: Andi Kleen <ak@linux.intel.com>
Cc: linux@armlinux.org.uk, Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
will.deacon@arm.com, arnd@arndb.de, longman@redhat.com,
linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, tglx@linutronix.de, bp@alien8.de,
hpa@zytor.com, x86@kernel.org, guohanjun@huawei.com,
jglauber@marvell.com, steven.sistare@oracle.com,
daniel.m.jordan@oracle.com, dave.dice@oracle.com
Subject: Re: [External] : Re: [PATCH v14 4/6] locking/qspinlock: Introduce starvation avoidance into CNA
Date: Tue, 13 Apr 2021 17:01:37 -0400 [thread overview]
Message-ID: <CA1141EF-76A8-47A9-97B9-3CB2FC246B1A@oracle.com> (raw)
In-Reply-To: <87mtu2vhzz.fsf@linux.intel.com>
Hi, Andi.
Thanks for your comments!
> On Apr 13, 2021, at 2:03 AM, Andi Kleen <ak@linux.intel.com> wrote:
>
> Alex Kogan <alex.kogan@oracle.com> writes:
>>
>> + numa_spinlock_threshold= [NUMA, PV_OPS]
>> + Set the time threshold in milliseconds for the
>> + number of intra-node lock hand-offs before the
>> + NUMA-aware spinlock is forced to be passed to
>> + a thread on another NUMA node. Valid values
>> + are in the [1..100] range. Smaller values result
>> + in a more fair, but less performant spinlock,
>> + and vice versa. The default value is 10.
>
> ms granularity seems very coarse grained for this. Surely
> at some point of spinning you can afford a ktime_get? But ok.
We are reading time when we are at the head of the (main) queue, but
don’t have the lock yet. Not sure about the latency of ktime_get(), but
anything reasonably fast but not necessarily precise should work.
> Could you turn that into a moduleparm which can be changed at runtime?
> Would be strange to have to reboot just to play with this parameter
Yes, good suggestion, thanks.
> This would also make the code a lot shorter I guess.
So you don’t think we need the command-line parameter, just the module_param?
Regards,
— Alex
next prev parent reply other threads:[~2021-04-13 21:02 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-01 15:31 [PATCH v14 0/6] Add NUMA-awareness to qspinlock Alex Kogan
2021-04-01 15:31 ` [PATCH v14 1/6] locking/qspinlock: Rename mcs lock/unlock macros and make them more generic Alex Kogan
2021-04-01 15:31 ` [PATCH v14 2/6] locking/qspinlock: Refactor the qspinlock slow path Alex Kogan
2021-04-01 15:31 ` [PATCH v14 3/6] locking/qspinlock: Introduce CNA into the slow path of qspinlock Alex Kogan
2021-04-13 11:30 ` Peter Zijlstra
2021-04-14 2:29 ` [External] : " Alex Kogan
2021-04-01 15:31 ` [PATCH v14 4/6] locking/qspinlock: Introduce starvation avoidance into CNA Alex Kogan
2021-04-13 6:03 ` Andi Kleen
2021-04-13 6:12 ` Andi Kleen
2021-04-13 21:01 ` Alex Kogan [this message]
2021-04-13 21:22 ` [External] : " Andi Kleen
2021-04-14 2:30 ` Alex Kogan
2021-04-14 16:41 ` Waiman Long
2021-04-14 17:26 ` Andi Kleen
2021-04-14 17:31 ` Waiman Long
2021-04-13 12:03 ` Peter Zijlstra
2021-04-16 2:52 ` [External] : " Alex Kogan
2021-04-01 15:31 ` [PATCH v14 5/6] locking/qspinlock: Avoid moving certain threads between waiting queues in CNA Alex Kogan
2021-04-01 15:31 ` [PATCH v14 6/6] locking/qspinlock: Introduce the shuffle reduction optimization into CNA Alex Kogan
2021-04-14 7:47 ` Andreas Herrmann
2021-04-14 18:18 ` [External] : " Alex Kogan
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=CA1141EF-76A8-47A9-97B9-3CB2FC246B1A@oracle.com \
--to=alex.kogan@oracle.com \
--cc=ak@linux.intel.com \
--cc=arnd@arndb.de \
--cc=bp@alien8.de \
--cc=daniel.m.jordan@oracle.com \
--cc=dave.dice@oracle.com \
--cc=guohanjun@huawei.com \
--cc=hpa@zytor.com \
--cc=jglauber@marvell.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=longman@redhat.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=steven.sistare@oracle.com \
--cc=tglx@linutronix.de \
--cc=will.deacon@arm.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).