[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <24e4d6db-9dc9-f113-f655-9af3a51723d4@omp.ru>
Date: Wed, 4 May 2022 14:23:39 +0300
From: Sergey Shtylyov <s.shtylyov@....ru>
To: Byungchul Park <byungchul.park@....com>,
<torvalds@...ux-foundation.org>
CC: <damien.lemoal@...nsource.wdc.com>, <linux-ide@...r.kernel.org>,
<adilger.kernel@...ger.ca>, <linux-ext4@...r.kernel.org>,
<mingo@...hat.com>, <linux-kernel@...r.kernel.org>,
<peterz@...radead.org>, <will@...nel.org>, <tglx@...utronix.de>,
<rostedt@...dmis.org>, <joel@...lfernandes.org>,
<sashal@...nel.org>, <daniel.vetter@...ll.ch>,
<chris@...is-wilson.co.uk>, <duyuyang@...il.com>,
<johannes.berg@...el.com>, <tj@...nel.org>, <tytso@....edu>,
<willy@...radead.org>, <david@...morbit.com>, <amir73il@...il.com>,
<bfields@...ldses.org>, <gregkh@...uxfoundation.org>,
<kernel-team@....com>, <linux-mm@...ck.org>,
<akpm@...ux-foundation.org>, <mhocko@...nel.org>,
<minchan@...nel.org>, <hannes@...xchg.org>,
<vdavydov.dev@...il.com>, <sj@...nel.org>, <jglisse@...hat.com>,
<dennis@...nel.org>, <cl@...ux.com>, <penberg@...nel.org>,
<rientjes@...gle.com>, <vbabka@...e.cz>, <ngupta@...are.org>,
<linux-block@...r.kernel.org>, <paolo.valente@...aro.org>,
<josef@...icpanda.com>, <linux-fsdevel@...r.kernel.org>,
<viro@...iv.linux.org.uk>, <jack@...e.cz>, <jack@...e.com>,
<jlayton@...nel.org>, <dan.j.williams@...el.com>,
<hch@...radead.org>, <djwong@...nel.org>,
<dri-devel@...ts.freedesktop.org>, <airlied@...ux.ie>,
<rodrigosiqueiramelo@...il.com>, <melissa.srw@...il.com>,
<hamohammed.sa@...il.com>, <42.hyeyoo@...il.com>
Subject: Re: [PATCH RFC v6 16/21] dept: Distinguish each work from another
Hello!
On 5/4/22 11:17 AM, Byungchul Park wrote:
> Workqueue already provides concurrency control. By that, any wait in a
> work doesn't prevents events in other works with the control enabled.
> Thus, each work would better be considered a different context.
>
> So let Dept assign a different context id to each work.
>
> Signed-off-by: Byungchul Park <byungchul.park@....com>
[...]
> diff --git a/kernel/dependency/dept.c b/kernel/dependency/dept.c
> index 18e5951..6707313 100644
> --- a/kernel/dependency/dept.c
> +++ b/kernel/dependency/dept.c
> @@ -1844,6 +1844,16 @@ void dept_enirq_transition(unsigned long ip)
> dept_exit(flags);
> }
>
> +/*
> + * Assign a different context id to each work.
> + */
> +void dept_work_enter(void)
> +{
> + struct dept_task *dt = dept_task();
> +
> + dt->cxt_id[DEPT_CXT_PROCESS] += (1UL << DEPT_CXTS_NR);
Parens around << unnecessary...
[...]
MBR, Sergey
Powered by blists - more mailing lists