This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 4/4] Consolidate posix_fadvise implementations



On 25/09/2016 03:42, Yury Norov wrote:
>> diff --git a/sysdeps/unix/sysv/linux/tile/kernel-features.h b/sysdeps/unix/sysv/linux/tile/kernel-features.h
>> index 9425e1c..ded0e43 100644
>> --- a/sysdeps/unix/sysv/linux/tile/kernel-features.h
>> +++ b/sysdeps/unix/sysv/linux/tile/kernel-features.h
>> @@ -23,4 +23,5 @@
>>     pairs to start with an even-number register.  */
>>  #ifndef _LP64
>>  # define __ASSUME_ALIGNED_REGISTER_PAIRS	1
>> +# define __ASSUME_FADVISE64_64_NO_ALIGN		1
>>  #endif
> 
> Hi Adhemerval,
> 
> In discussion to the readahead() consolidation patch [1] you recommend
> not to add new __ASSUME_ options, and have exceptional implementation
> for tile. But in this patch for posix_fadvise() consolidation you add
> new __ASSUME_FADVISE64_64_NO_ALIGN. This cases are very similar, so I
> think, to be consistent, you'd also rework posix_fadvise() too. 
> 
> [1] https://sourceware.org/ml/libc-alpha/2016-09/msg00494.html
> 
> Yury.
> 

There is no direct rule on where to add of not an __ASSUME define, my
understanding it is more a rule of thumb depending of the case.
But you do have a point and thinking twice current glibc internal header
organization does not allow to redefine __ALIGNMENT flags easily
(sysdep.h headers are included many time without guards).

So I think __ASSUME is indeed a better alternative, sorry for the noise.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]