2001-03-04 21:50:22

by Ulrich Kunitz

[permalink] [raw]
Subject: [PATCH] tiny MM performance and typo patches for 2.4.2

--- linux-2.4.2/include/asm-i386/pgtable-3level.h Wed Oct 18 23:25:46 2000
+++ linux/include/asm-i386/pgtable-3level.h Sun Mar 4 19:25:00 2001
@@ -48,7 +48,7 @@
/* Rules for using set_pte: the pte being assigned *must* be
* either not present or in a state where the hardware will
* not attempt to update the pte. In places where this is
- * not possible, use pte_get_and_clear to obtain the old pte
+ * not possible, use ptep_get_and_clear to obtain the old pte
* value and then use set_pte to update it. -ben
*/
static inline void set_pte(pte_t *ptep, pte_t pte)


Attachments:
(No filename) (888.00 B)
patch-uk2 (880.00 B)
patch-uk2
patch-uk6 (547.00 B)
patch-uk6
patch-uk5 (1.06 kB)
patch-uk5
patch-uk1 (447.00 B)
patch-uk1
patch-uk3 (578.00 B)
patch-uk3
Download all attachments

2001-03-04 21:55:51

by David Miller

[permalink] [raw]
Subject: Re: [PATCH] tiny MM performance and typo patches for 2.4.2


Ulrich Kunitz writes:
> patch-uk6 In 2.4.x _page_hashfn divides struct address_space pointer
> with a parameter derived from the size of struct
> inode. Deriving this parameter from the size of struct
> address_space makes more sense -- at least for me.

The address_space is %99 of the time (unless swapping, and in that
case the address is constant :-)) inside of an inode struct so this
change actually makes the hash worse. I looked at this one time
myself...

Later,
David S. Miller
[email protected]

2001-03-05 01:20:52

by Rik van Riel

[permalink] [raw]
Subject: Re: [PATCH] tiny MM performance and typo patches for 2.4.2

On Sun, 4 Mar 2001, David S. Miller wrote:
> Ulrich Kunitz writes:
> > patch-uk6 In 2.4.x _page_hashfn divides struct address_space pointer
> > with a parameter derived from the size of struct
> > inode. Deriving this parameter from the size of struct
> > address_space makes more sense -- at least for me.
>
> The address_space is %99 of the time (unless swapping, and in that
> case the address is constant :-)) inside of an inode struct so this
> change actually makes the hash worse. I looked at this one time
> myself...

The other patches look fine to me. Alan, Linus, could
you please include Ulrich's other patches in the next
pre-kernel ?

thanks,

Rik
--
Virtual memory is like a game you can't win;
However, without VM there's truly nothing to lose...

http://www.surriel.com/
http://www.conectiva.com/ http://distro.conectiva.com.br/

2001-03-05 07:26:11

by Mike Galbraith

[permalink] [raw]
Subject: Re: [PATCH] tiny MM performance and typo patches for 2.4.2

On Sun, 4 Mar 2001, Ulrich Kunitz wrote:

> patch-uk2 makes use of the pgd, pmd and pte quicklists for x86 too;
> risky: there might be a reason that 2.4.x doesn't use the
> quicklists.

I remember these being taken out (long ago), but not why. Anyone?

-Mike

2001-03-05 15:26:30

by Rik van Riel

[permalink] [raw]
Subject: Re: [PATCH] tiny MM performance and typo patches for 2.4.2

On Mon, 5 Mar 2001, Mike Galbraith wrote:
> On Sun, 4 Mar 2001, Ulrich Kunitz wrote:
>
> > patch-uk2 makes use of the pgd, pmd and pte quicklists for x86 too;
> > risky: there might be a reason that 2.4.x doesn't use the
> > quicklists.
>
> I remember these being taken out (long ago), but not why. Anyone?

They probably wasted too much memory ...

Having _2_ quicklists per CPU (on SMP) is probably the way
to go: one with zeroed pages and one with non-zeroed pages.

This should avoid cache contention in __alloc_pages() and
also avoid unneeded zeroing of pages (when we put away a
zeroed page, eg. an freed pagetable page).

On UP we probably want a (smaller) freelist with zeroed
pages only, since that means we can keep more pages on the
inactive_clean list.

regards,

Rik
--
Virtual memory is like a game you can't win;
However, without VM there's truly nothing to lose...

http://www.surriel.com/
http://www.conectiva.com/ http://distro.conectiva.com.br/