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 -
| Faik Uygur | Re: Linux 2.6.21-rc1 |
| pageexec | Re: [stable] Linux 2.6.25.10 |
| Tarkan Erimer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
git: | |
| Mark Lord | Re: 2.6.25-rc8: FTP transfer errors |
| Natalie Protasevich | [BUG] New Kernel Bugs |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| Jarek Poplawski | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
