On Wednesday 02 November 2005 22:43, Nick Piggin wrote:
I'd just be happy with UML handing back page sized chunks of memory that
it isn't currently using. How does contiguous memory (in either the host
or the guest) help this?
Smaller chunks of memory are likely to be reclaimed really soon, and adding in the syscall overhead working with individual pages of memory is almost guaranteed to slow us down.
Plus with punch, we'd be fragmenting the heck out of the underlying file.
What does this have to do with specifying hard limits of anything? What's to specify? Workloads vary. Deal with it.
Umm, if you hadn't bothered to read the thread then I won't go through
it all again. The short of it is that if you want guaranteed unfragmented
memory you have to specify a limit.
I read it. It just didn't contain an answer the the question. I want UML to be able to hand back however much memory it's not using, but handing back individual pages as we free them and inserting a syscall overhead for every page freed and allocated is just nuts. (Plus, at page size, the OS isn't likely to zero them much faster than we can ourselves even without the syscall overhead.) Defragmentation means we can batch this into a granularity that makes it worth it.
This has nothing to do with hard limits on anything.
Have you looked at the frag patches?
I've read Mel's various descriptions, and tried to stay more or less up to date ever since LWN brought it to my attention. But I can't say I'm a linux VM system expert. (The last time I felt I had a really firm grasp on it was before Andrea and Rik started arguing circa 2.4 and Andrea spent six months just assuming everybody already knew what a classzone was. I've had other things to do since then...)
Duplicating the same or similar infrastructure (in this case, a memory zoning facility)
is a bad thing in general.
Even when they keep track of very different things? The memory zoning thing is about where stuff is in physical memory, and it exists because various hardware that wants to access memory (24 bit DMA, 32 bit DMA, and PAE) is evil and crippled and we have to humor it by not asking it to do stuff it can't.
I was under the impression it was orthogonal to figuring out whether or not a given bank of physical memory is accessable to your sound blaster without an IOMMU.
Err, the point is so we don't now have 2 layers doing very similar things,
at least one of which has "particularly silly" bugs in it.
Similar is not identical. You seem to be implying that the IO elevator and the network stack queueing should be merged because they do similar things.
If you'd like to write a counter-patch to Mel's to prove it...
So you didn't look at Yasunori Goto's patch from last year that implements
exactly what I described, then?
I saw the patch he just posted, if that's what you mean. By his own admission, it doesn't address fragmentation at all.
Yes, zones are a way of categorizing memory.
Yes, have you read Mel's patches? Guess what they do?
The swap file is a way of storing data on disk. So is ext3. Obviously, one is a trivial extension of the other and there's no reason to have both.
They're not a way of defragmenting it.
Guess what they don't?
I have no idea what you intended to mean by that. Mel posted a set of patches
in a thread titled "fragmentation avoidance", and you've been arguing about hotplug, and pointing to a set of patches from Goto that do not address fragmentation at all. This confuses me.