Re: [PATCH 05/11] block: avoid ordered task state change for polled IO

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

 



On 11/13/18 7:29 PM, jianchao.wang wrote:
> Hi Jens
> 
> On 11/13/18 11:42 PM, Jens Axboe wrote:
>> @@ -181,6 +181,7 @@ static void blkdev_bio_end_io_simple(struct bio *bio)
>>  	struct task_struct *waiter = bio->bi_private;
>>  
>>  	WRITE_ONCE(bio->bi_private, NULL);
>> +	smp_wmb();
>>  	wake_up_process(waiter);
>>  }
> 
> 
> The wake up path has contained a full memory barrier with the raw_spin_lock
> and following smp_mb__after_spinlock
> 
> Please refer to:
> 
> wake_up_process
>   -> try_to_wake_up
> 
> 	raw_spin_lock_irqsave(&p->pi_lock, flags);
> 	smp_mb__after_spinlock();
> 
> So the smp_wmb here is not necessary.

And I guess we don't need it for the next patch either, since the path
that doesn't take wake_up_process() is local.

I'll update them (again), thanks!

-- 
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