Re: [PATCH RFC v6 16/21] dept: Distinguish each work from another

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>
[...]
> 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



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux