|
From: Julian S. <js...@ac...> - 2004-09-02 11:13:18
|
> > One point to bear in mind is that the conversation that followed > > appeared to be silently predicated on the assumption that Linux is > > the only kernel we're interested in. > > Some of the stuff (using mmap()) is plain POSIX. But the stuff about > overcommitting, etc, is Linux-specific. Right. So an important thing to achieve here is to restrict our needs to plain POSIX, and have a solution independent of (eg) overcommitting hints. > In general, I'm not happy about relying on doing huge (eg. 1.5GB) mmaps. > Seems too fragile in general. I entirely agree. > > Let's just forget about big-bang shadow allocation. It causes a whole > > bunch of problems, we're not using it at the moment, > > No -- we are using it at the moment. However, we are not using > direct-offset shadow addressing (for which big-bang shadow allocation is a > prerequisite). Sorry if I didn't make this clear, seems like I should > have been more careful with my terminology in the RFC. Uh, ok, this is my sloppy thinking. I meant, we are not using direct- offset shadow addressing and therefore there is no reason for big-bang shadow allocation (is there?) > Actually, we just need one of the following to be true: > > the client must be within 0..2^N > > or > > Valgrind must be outside 0..2^N > > Ie. there could be unused address space between them, and the dividing > line just has to fall within that. > > But this seems problematic -- the only dividing line that really makes > sense for 32-bit is either 1GB or 2GB, which doesn't allow the client to > get very big. Yes, any solution which involves a single and (or nand) seems to inflexible. > > If the machine contains a scalar 'min' insn, then we can do this cheaply > > for any N. > > Yes. Is such an instruction common? I don't think so, at least not in scalar pipelines (SIMD ones maybe). PaulM, what's the deal on ppc? On x86 (if we don't use seg regs) we can do 'cmp %limit, %addr ; cmovge %limit, %addr' which isn't great, but it isn't a disaster either, and it sounds relatively portable. J |