the "vm_mm->mm" was of course a typo and should be read as
"vma->vm_mm". Sorry.


On Thu, 7 Sep 2000, Tigran Aivazian wrote:

> On Thu, 7 Sep 2000, Tigran Aivazian wrote:
> 
> > On Thu, 7 Sep 2000, Linus Torvalds wrote:
> > 
> > > 
> > > 
> > > On Thu, 7 Sep 2000, Tigran Aivazian wrote:
> > > > 
> > > > k) all swapout functions in mm/vmscan.c can be optimized by removing 'mm'
> > > >    argument. This part was reviewed by Rick van Riel and approved.
> > > 
> > > But they then get "mm" themselves anyway.
> > > 
> > > What's the point? With argument passing, on certain architectures it stays
> > > in registers. On other architectures it is in memory on the stack, but
> > > that's not slower than accessing it from memory off another pointer. 
> > > 
> > >           Linus
> > 
> > Linus, I am sorry to say this (because I know you are busy) but it would
> > appear you didn't look at the patch (that part of it). The patch does the
> > right thing, I believe, but my description was too brief.
> > 
> > If you look at those functions you will see that they sometimes access
> > 'mm' via argument and sometimes via vm_mm->mm - this is a complete mess so
> > my patch tidies it up a bit.
> > 
> > In other words, if that 'mm' is available via vm_mm->mm there is no point
> > in passing it on the stack. Or if we pass it on the stack, there is no
> > point accessing it via vm_mm->mm. See my point now?
> 
> in case, even this is too brief, here is more:
> 
> ... so, I had a choice between:
> 
> a) remove 'mm' argument
> 
> or
> 
> b) make all access to 'mm' go via this 'mm' argument
> 
> and I thought removing the argument, i.e. choice a) was better than b).
> 
> And, yes, I do understand how arguments are passed and what gcc can do
> about it.
> 
> Regards,
> Tigran
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [EMAIL PROTECTED]
> Please read the FAQ at http://www.tux.org/lkml/
> 

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/

Reply via email to