Skip to contentSkip to conversation

cache pollution aware __copy_from_user_ll()

RFC PATCH Ian Kumlien 2 participants 3 messages Aug 14, 2005 – Aug 15, 2005

lore
Share & tools
lore
#0 lore raw

Hi, all

I might be missunderstanding things but...

First of all, machines with long pipelines will suffer from cache misses (p4 in this case).

Depending on the size copied, (i don't know how large they are so..) can't one run out of cachelines and/or evict more useful cache data?

Ie, if it's cached from begining to end, we generally only need 'some of' the begining, the cpu's prefetch should manage the rest.

I might, as i said, not know all about things like this and i also suffer from a fever but i still find Hiro's data interesting.

Isn't there some way to do the same test for the same time and measure the differences in allround data? to see if we really are punished as bad on accessing the data post copy? (could it be size dependant?)

Signature · 1 line
Ian Kumlien <pomac () vapor ! com> -- http://pomac.netswarm.net
#1 lore raw
Quoted 9 lines · Ian Kumlien

Hi, all

I might be missunderstanding things but...

First of all, machines with long pipelines will suffer from cache misses (p4 in this case).

Depending on the size copied, (i don't know how large they are so..) can't one run out of cachelines and/or evict more useful cache data?

CPU caches are really big nowadays

Quoted 3 lines

Ie, if it's cached from begining to end, we generally only need 'some of' the begining, the cpu's prefetch should manage the rest.

cpu prefetch isn't going to be fast enough. It helps some, but in the end the cpu prefetch also has to wait for the ram, it doesn't make the ram faster or free, it just takes a jumpstart on getting to it.

Quoted 2 lines

I might, as i said, not know all about things like this and i also suffer from a fever but i still find Hiro's data interesting.

It is. It's good proof that you can make a big gain already by converting a few key places to his excellent code. And neither me nor Christoph are suggesting to ditch his effort! Instead we suggest that what he is doing is useful for some cases and harmful for others, and that it is quite easy to identify those cases and separate them from eachother, and that thus as a result it is more optimal to have 2 apis, one for each of the cases.

#2 lore raw
Quoted 5 lines · Arjan van de Ven
Quoted 4 lines · Ian Kumlien

Hi, all

I might be missunderstanding things but...

Quoted 7 lines
Quoted 5 lines

First of all, machines with long pipelines will suffer from cache misses (p4 in this case).

Depending on the size copied, (i don't know how large they are so..) can't one run out of cachelines and/or evict more useful cache data?

CPU caches are really big nowadays

Yes but (is copy to/from user size limited?) whats the cahes size compared to the copy operation preformed compared to lost useful cachelines =)

Quoted 6 lines
Quoted 2 lines

Ie, if it's cached from begining to end, we generally only need 'some of' the begining, the cpu's prefetch should manage the rest.

cpu prefetch isn't going to be fast enough. It helps some, but in the end the cpu prefetch also has to wait for the ram, it doesn't make the ram faster or free, it just takes a jumpstart on getting to it.

Yeah i know, but i was thinking more of a compromize, then it might be better...

Quoted 10 lines
Quoted 2 lines

I might, as i said, not know all about things like this and i also suffer from a fever but i still find Hiro's data interesting.

It is. It's good proof that you can make a big gain already by converting a few key places to his excellent code. And neither me nor Christoph are suggesting to ditch his effort! Instead we suggest that what he is doing is useful for some cases and harmful for others, and that it is quite easy to identify those cases and separate them from eachother, and that thus as a result it is more optimal to have 2 apis, one for each of the cases.

Thats good to know, since i have wondered for a while why block io seems so oddly slow...

I just thought that there might be some good compromize between the two that would make it automatic.

Oh well, guess i'm back to coughing and waiting for patches to be implemented =)

Signature · 1 line
Ian Kumlien <pomac () vapor ! com> -- http://pomac.netswarm.net