This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 4/4] Consolidate posix_fadvise implementations
- From: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- To: Yury Norov <ynorov at caviumnetworks dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Mon, 26 Sep 2016 12:44:33 -0700
- Subject: Re: [PATCH 4/4] Consolidate posix_fadvise implementations
- Authentication-results: sourceware.org; auth=none
- References: <1471617709-16267-1-git-send-email-adhemerval.zanella@linaro.org> <1471617709-16267-5-git-send-email-adhemerval.zanella@linaro.org> <20160925104202.GA1349@yury-N73SV>
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.