Re: [PATCH] CodeSamples/defer: Make hazard partition consistent with hazptr_thread_exit

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

 



> 2023年4月25日 00:02,Paul E. McKenney <paulmck@xxxxxxxxxx> 写道:
> 
> On Thu, Apr 20, 2023 at 07:40:30AM +0000, Alan Huang wrote:
>> Signed-off-by: Alan Huang <mmpgouride@xxxxxxxxx>
>> ---
>> CodeSamples/defer/hazptrtorture.h | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/CodeSamples/defer/hazptrtorture.h b/CodeSamples/defer/hazptrtorture.h
>> index 29761e3d..acdd532b 100644
>> --- a/CodeSamples/defer/hazptrtorture.h
>> +++ b/CodeSamples/defer/hazptrtorture.h
>> @@ -99,7 +99,7 @@ void *hazptr_read_perf_test(void *arg)
>> {
>> 	int i;
>> 	int me = (long)arg;
>> -	int base = me * K;
>> +	int base = smp_thread_id() * K;
> 
> Suppose specify a number of threads greater than the number of CPUs.
> For example, on my 12-hardware-thread laptop:
> 
> ./route_hazptr --stresstest --nreaders 24
> 
> In that case, don't we want "me" rather than "smp_thread_id()"?

As Akira said, route_hazptr.c includes routetorture.h and route_hazptr.c doesn't call hp_record().
The fix won't have any effect on route_hazptr.

Thanks,
Alan

> 
> 							Thanx, Paul
> 
>> 	long long n_reads_local = 0;
>> 	hazptr_head_t hh;
>> 	hazptr_head_t *hhp = &hh;
>> -- 
>> 2.34.1
>> 





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux