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: Handle various cache size


On Tue, Sep 7, 2010 at 4:50 PM, Ulrich Drepper <drepper@redhat.com> wrote:
> ----- "H.J. Lu" <hongjiu.lu@intel.com> wrote:
>> ? ? ? * sysdeps/i386/i686/multiarch/memset-sse2.S: Handle various
>> ? ? ? cache size.
>
> I don't like this. ?As Jakub mentioned elsewhere, doing this work all the time the function is called is unnecessarily expensive. ?I haven't looked how exactly the code uses the cache size. ?My guess is that odd cache sizes can be handled in some way without additional overhead.
>
> If this is not the case then a special new variable should be introduced in cacheinfo. ?Then the memset code should use this rounded cache size variable.
>

Those odd cache sizes are hard to use for optimized string/memory functions,
which are the major users of those values. I think they should be rounded to
multiple of 1KB, 512B or  256B.  If we want to provide the raw cache size
values, we should introduce new values so that we don't have to change
all those optimized string/memory functions,


-- 
H.J.


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