2004-09-09 18:00:28

by Blaisorblade

[permalink] [raw]
Subject: [patch 1/1] uml-update-2.6.8-finish


Add some updates for API changes in 2.6.8 which were not included in the original
UML patch; these fixes were detected by some warnings, so I probably missed some more
ones.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <[email protected]>
---

uml-linux-2.6.8.1-paolo/include/asm-um/dma-mapping.h | 2 ++
1 files changed, 2 insertions(+)

diff -puN include/asm-um/dma-mapping.h~uml-update-2.6.8-finish include/asm-um/dma-mapping.h
--- uml-linux-2.6.8.1/include/asm-um/dma-mapping.h~uml-update-2.6.8-finish 2004-09-07 15:17:57.593456048 +0200
+++ uml-linux-2.6.8.1-paolo/include/asm-um/dma-mapping.h 2004-09-07 15:17:57.595455744 +0200
@@ -1,6 +1,8 @@
#ifndef _ASM_DMA_MAPPING_H
#define _ASM_DMA_MAPPING_H

+#include <asm/scatterlist.h>
+
static inline int
dma_supported(struct device *dev, u64 mask)
{
_


2004-09-10 19:03:23

by Blaisorblade

[permalink] [raw]
Subject: Re: [uml-devel] [patch 1/1] uml-update-2.6.8-finish

On Wednesday 08 September 2004 19:38, [email protected] wrote:
> Add some updates for API changes in 2.6.8 which were not included in the
> original UML patch; these fixes were detected by some warnings, so I
> probably missed some more ones.
Well, Andrew, this one should go in, please. No review should be needed, I
hope.
> Signed-off-by: Paolo 'Blaisorblade' Giarrusso <[email protected]>
> ---
>
> uml-linux-2.6.8.1-paolo/include/asm-um/dma-mapping.h | 2 ++
> 1 files changed, 2 insertions(+)
>
> diff -puN include/asm-um/dma-mapping.h~uml-update-2.6.8-finish
> include/asm-um/dma-mapping.h ---
> uml-linux-2.6.8.1/include/asm-um/dma-mapping.h~uml-update-2.6.8-finish 2004
>-09-07 15:17:57.593456048 +0200 +++
> uml-linux-2.6.8.1-paolo/include/asm-um/dma-mapping.h 2004-09-07
> 15:17:57.595455744 +0200 @@ -1,6 +1,8 @@
> #ifndef _ASM_DMA_MAPPING_H
> #define _ASM_DMA_MAPPING_H
>
> +#include <asm/scatterlist.h>
> +
> static inline int
> dma_supported(struct device *dev, u64 mask)
> {
> _
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
> Project Admins to receive an Apple iPod Mini FREE for your judgement on
> who ports your project to Linux PPC the best. Sponsored by IBM.
> Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
> _______________________________________________
> User-mode-linux-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

--
Paolo Giarrusso, aka Blaisorblade
Linux registered user n. 292729

2004-09-11 15:44:45

by Blaisorblade

[permalink] [raw]
Subject: Re: [patch 1/1] uml-update-2.6.8-finish

On Friday 10 September 2004 23:03, Jeff Dike wrote:
> [email protected] said:
> > About the one from Jeff Dike, it's dangerous because I don't know
> > whether or not we would see any introduced bug.

> The ghash removal? That's necessary, for one, and that code isn't
> currently used anyway, so any bugs that I introduced can be sorted out
> later. For now, it's sufficient that it compiles.
And making it compile with the hash code, rather than the rb_tree one? I know
ghash.h must be removed, but there is no reason at all to switch to Red-Black
trees. Even because, later, we will just see "Hey, I get a panic here" +
backtrace. Doing things right in first place is better.

Andrew, what's your opinion about this? Do you prefer staying with the same
code (but without having a ghash.h) or using the new one?

My idea is to move the needed #defines (not everything) inside physmem.c for
now, so that ghash.h does not appear in 2.6.9; then, after fixing the
breakage for mainline, we can look at the code to see if it needs any change;
however that should be tested for a while (probably in Jeff Dike's tree,
which is going to become for experimental stuff, now that UML gets merged in
mainline).

Bye
--
Paolo Giarrusso, aka Blaisorblade
Linux registered user n. 292729

2004-09-11 17:12:37

by Jeff Dike

[permalink] [raw]
Subject: Re: [patch 1/1] uml-update-2.6.8-finish

On Sat, Sep 11, 2004 at 05:40:12PM +0200, BlaisorBlade wrote:
> And making it compile with the hash code, rather than the rb_tree one? I know
> ghash.h must be removed, but there is no reason at all to switch to Red-Black
> trees.

It is not just that ghash.h be removed. It is that its contents have
to vanish. That code shouldn't be anywhere.

There are good reasons to switch to rbtrees -
I need some sort of low-O lookup
there is no generic hash tree in the kernel
rbtree is O(lg n) and it's generic
rbtree is the only generic low-O lookup in the kernel that I see

I'm not in the fancy data structure business, so I'll stick with the
infrastructure that I find in the pool already, and rbtree is about it.

> Even because, later, we will just see "Hey, I get a panic here" +
> backtrace.

No, because currently there are no users of this. We can get this tested
when UML starts mmapping into its page cache.

> Doing things right in first place is better.

And inlining the grunge is right?

Jeff

2004-09-11 17:53:14

by Blaisorblade

[permalink] [raw]
Subject: Re: [patch 1/1] uml-update-2.6.8-finish

On Saturday 11 September 2004 20:15, Jeff Dike wrote:
> On Sat, Sep 11, 2004 at 05:40:12PM +0200, BlaisorBlade wrote:
> > And making it compile with the hash code, rather than the rb_tree one? I
> > know ghash.h must be removed, but there is no reason at all to switch to
> > Red-Black trees.

> It is not just that ghash.h be removed. It is that its contents have
> to vanish. That code shouldn't be anywhere.

Ok, if that is the reason it's ok. When I asked "Why remove it" I've been said
"look at the code and you'll see why". Probably I'm blind, then. (And it can
be true, because I'm somehow a new-comer in kernel hacking).
The "Fuzzy retrieval" is probably useless, clearly, but it's not clear to me
the problem with the other code.

> There are good reasons to switch to rbtrees -
> I need some sort of low-O lookup
> there is no generic hash tree in the kernel
> rbtree is O(lg n) and it's generic
> rbtree is the only generic low-O lookup in the kernel that I see

Hmm, everything is true, apart that we need some generic lookup way. That can
be true for now - using something means using something tested.

However, for the future, hashing is lower-O than rb-trees (if the hash
function is good), but while an empty rb-tree requires no memory (just the
root node), an hash requires anyway the table. That's the difference. And
there is no generic hash struct because (I guess) the developer prefer it not
to be generic - hashing is used for many things, but developed individually.

> I'm not in the fancy data structure business, so I'll stick with the
> infrastructure that I find in the pool already, and rbtree is about it.

> > Even because, later, we will just see "Hey, I get a panic here" +
> > backtrace.

> No, because currently there are no users of this. We can get this tested
> when UML starts mmapping into its page cache.

Yes, and I meant at that moment.
> > Doing things right in first place is better.

> And inlining the grunge is right?

It would be stabler, if it has been tested. But since I guess ubd-mmap was the
only tester, (and it did not work), it's ok to shift to rb-trees.

Also, I still don't have clear why it's a "grunge".
--
Paolo Giarrusso, aka Blaisorblade
Linux registered user n. 292729