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 RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux