Re: Linux-2.5.16

Roman Zippel (zippel@linux-m68k.org)
Mon, 20 May 2002 03:10:44 +0200 (CEST)


Hi,

On Sun, 19 May 2002, Linus Torvalds wrote:

> > - freed is never incremented, callers of tlb_remove_page have to do the
> > rss update themselves?
>
> No, that's just a missed thing (for a while I thought I could use "nr" for
> "freed", so I changed the code and forgot to add back the free'd).

If I see it correctly, tlb_remove_page() can't be called with a swap page,
does it make sense to use free_page_and_swap_cache()?

> > - will a non smp version later be added again?
>
> Not likely, at least not in the form it was before of having two
> completely different paths.
>
> But I was thinking of doing a one-source thing that the compiler can
> statically optimize, with something like
>
> #ifdef CONFIG_SMP
> #define fast_case(tlb) ((tlb)->nr == ~0UL)
> #else
> #define fast_case(tlb) (1)
> #endif
>
> which allows us to have one set of sources for both UP and SMP, but the UP
> case gets optimized by the compiler.

I was thinking about this and I agree, but this is needed as well

#define FREE_PTE_NR 1

otherwise we waste 2KB. :)

> Do you want to do the freed and the above and test it?

Sure.

bye, Roman

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/