lkml.org 
[lkml]   [2008]   [Jul]   [3]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateWed, 2 Jul 2008 19:35:11 -0700 (PDT)
FromLinus Torvalds <>
SubjectRe: [PATCH 1/2] Introduce copy_user_handle_tail routine

On Wed, 2 Jul 2008, Vitaly Mayatskikh wrote:
> 
> Linus wanted this routine to be extremely dumb.

Well, I wanted it simple and dumb, but not dumber than _necessary_.

I think

	if (cleartail)
		memset(dst,0,len);
	return len;
is basically what we should have at the end. Simple and sweet.

Now, the stuff that comes *before* that point is the "try to fix up one 
byte at a time" thing, which I'd like to be simple and dumb. At least to 
start with.

Of course, I also suspect that *eventually* we might want to make it 
smarter and more complex. For example, while performance isn't a primary 
issue, we might want to eventually avoid having to do _two_ faults (once 
in the fast unrolled or word-at-a-time loop, and once in the byte-for-byte 
one), by limiting the byte-for-byte one to be within a page, but that 
would be a "future enhancement" thing.

		Linus


\
 
 \ /
  Last update: 2008-07-03 10:55    [from the cache]
©2003-2008