On Wed, 2008-01-30 at 18:28 +0100, Peter Zijlstra wrote:That's a pretty reasonable approach. My original approach was to buffer a page worth of PTEs with all the attendant malloc annoyances. Then Andrew and I came up with another fix a bit ago by effectively doing a batch of size 1: mapping and immediately unmapping per PTE. That's basically a no-op on !HIGHPTE but could potentially be expensive in the HIGHPTE case. Your approach might be a good complexity/performance middle ground. Unfortunately, I think we only implemented our fix in one of the relevant places: the /proc/pid/pagemap code hooks a callback at the pte table level and then does its own walk across the table. Perhaps I should refactor this so that it hooks in at the pte entry level of the walker instead. Looks like this could be: for (i = 0; i < WALK_BATCH_SIZE && addr + i * PAGE_SIZE != end; i++) ptes[i] = pte[i]; for (i = 0; i < WALK_BATCH_SIZE && addr != end; i++, addr+= PAGE_SIZE) { err = walk->pte_entry(ptes[i], addr, addr + PAGE_SIZE, private); And we can ditch start. Also, one wonders if setting batch size to 1 will then convince the compiler to collapse this into a more trivial loop in the !HIGHPTE case. -- Mathematics is the supreme nostalgia of our time. --
| Greg Kroah-Hartman | [PATCH 004/196] Chinese: add translation of SubmittingPatches |
| Tarkan Erimer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Willy Tarreau | Re: Linux 2.6.21 |
| Jan Kundrát | kswapd high CPU usage with no swap |
git: | |
| Jarek Poplawski | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| David Miller | [GIT]: Networking |
| David Miller | Re: [PATCH] tcp: splice as many packets as possible at once |
