On Wed, 2007-10-03 at 08:47 -0700, Adam Litke wrote:That's an excellent problem description. I'm just a bit hazy on how the patch fixes it. :) What is the actual error in this loop? The fact that we can go trying to free pages when the count is actually OK? BTW, try_to_free_low(count) kinda sucks for a function name. Is that count the number of pages we're trying to end up with, or the total number of low pages that we're trying to free? Also, as I look at try_to_free_low(), why do we need to #ifdef it out in the case of !HIGHMEM? If we have CONFIG_HIGHMEM=yes, we still might not have any _actual_ high memory. So, they loop obviously doesn't *hurt* when there is no high memory. The real problem with this line is that "count" is too ambiguous. :) We could rewrite the original max() line this way: if (resv_huge_pages > nr_of_pages_to_end_up_with) nr_of_pages_to_end_up_with = resv_huge_pages; try_to_make_the_total_nr_of_hpages(nr_of_pages_to_end_up_with); Which makes it more clear that you're setting the number of total pages to the number of reserved pages, which is obviously screwy. OK, so this is actually saying: "count can never go below resv_huge_pages+nr_huge_pages"? Could we change try_to_free_low() to free a distinct number of pages? if (count > free_huge_pages) count = free_huge_pages; try_to_free_nr_huge_pages(count); I feel a bit sketchy about the "resv_huge_pages + nr_huge_pages - free_huge_pages" logic. Could you elaborate a bit there on what the rules are? -- Dave -
| Junio C Hamano | [ANNOUNCE] GIT 1.6.0 |
| Linus Torvalds | Re: [ANNOUNCE] mdb: Merkey's Linux Kernel Debugger 2.6.27-rc4 released |
| Bart Van Assche | Integration of SCST in the mainstream Linux kernel |
| Paul Menage | Re: [RFC][PATCH 6/7] Account for the number of tasks within container |
git: | |
| Nicolas Pitre | Re: pack operation is thrashing my server |
| Scott Chacon | Git Community Book |
| Greg KH | Re: [ANNOUNCE] pg - A patch porcelain for GIT |
| Lars Hjemli | [PATCH] git-merge: add option --no-ff |
| GVG GVG | ssh_exchange_identification: Connection closed by remote host |
| Nick Guenther | Re: Real men don't attack straw men |
| Travers Buda | Re: Important OpenBSD errata |
| Gregory Edigarov | How to re-build openssl with SHA1 support? |
| Al Boldi | [RFC] VM: I have a dream... |
| Dave Kleikamp | Re: [RFC] Heads up on sys_fallocate() |
| Jörn | Review status (Re: [PATCH] LogFS take three) |
| Chris Mason | [ANNOUNCE] Btrfs v0.12 released |
