Skip to contentSkip to conversation

lstrncpy_from_user() additional question [Was: [parisc-linux] test case for pa_memset() ;-)]

DISCUSSION Joel Soete 1 participant 1 message Dec 19, 2004 2 messages not in the archive

lore
Share & tools
lore

Joel Soete

author
#2 lore raw
In reply to a message not in the archive

Randolph,

I would like to get your opinion about the idea to re-write this lstrncpy_from_user() in c as you did with pa_memcpy() (may be easiest to maintain?)

Thanks,
Joel

Quoted 15 lines · Randolph Chung
Quoted 3 lines

Any interest?

This tmset3.c is a very draft and all advise will be welcome :-)

Joel, i didn't notice earlier that you were working on memset.... i don't think you'll see much improvement over our current implementation. memcpy was a target for optimization because it used to copy *one-byte-at-a-time*, but our memset already knows about byte boundaries and tries to write more at a time when possible. i suspect you are seeing slower results with your implementation because of increased code size and branch hits. you're unlikely to see much improvement compared to the current version unless you either unroll the loop or do some more clever instruction scheduling.

Quoted 5 lines

the three routines in arch/parisc/lib/lusercopy.S are probably better targets for optimization because they are all doing one-byte-at-a-time operations, so there is more room for improvement.

randolph

_______________________________________________
parisc-linux mailing list
[email protected]
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux