Re: [for-416 PATCH 1/2] bcache: Fix, improve efficiency of closure_sync()

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

 



On 12/30/17 4:09 PM, Michael Lyle wrote:
> +void __closure_sync(struct closure *cl)
> +{
> +	struct closure_syncer s = { .task = current };
>  
> +	cl->s = &s;
> +	continue_at(cl, closure_sync_fn, NULL);
> +
> +	while (1) {
> +		__set_current_state(TASK_UNINTERRUPTIBLE);
> +		smp_mb(); /* Ensure task state set before load of done flag */

That's why we have set_current_state().

-- 
Jens Axboe




[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