Hi, I've spent some time trying to understand why swapoff is such a slow operation. My experiments show that when there is not much free physical memory, swapoff moves pages out of swap at a rate of approximately 5mb/sec. When there is a lot of free physical memory, it is faster but still a slow CPU-intensive operation, purging swap at about 20mb/sec. I've read into the swap code and I have some understanding that this is an expensive operation (and has to be). This page was very helpful and also agrees: http://kernel.org/doc/gorman/html/understand/understand014.html After reading that, I have an idea for a possible optimization. If we were to create a system call to disable ALL swap partitions (or modify the existing one to accept NULL for that purpose), could this process be signficantly less complex? I'm thinking we could do something like this: 1. Prevent any more pages from being swapped out from this point 2. Iterate through all process page tables, paging all swapped pages back into physical memory and updating PTEs 3. Clear all swap tables and caches Due to only iterating through process page tables once, does this sound like it would increase performance non-trivially? Is it feasible? I'm happy to spend a few more hours looking into implementing this but would greatly appreciate any advice from those in-the-know on if my ideas are broken to start with... Thanks! -- Daniel Drake Brontes Technologies, A 3M Company http://www.brontes3d.com/opensource -
| Eric Sandeen | Re: [RFC] Heads up on sys_fallocate() |
| Linus Torvalds | Linux 2.6.27 |
| Cornelia Huck | Re: 2.6.22-rc3-mm1 |
| Andi Kleen | [PATCH for review] [6/48] x86: trim memory not covered by WB MTRRs |
| Linux Kernel Mailing List | i.MX3: make SoC devices globally available |
| Linux Kernel Mailing List | MXC: Remove WD IRQ priority setting |
| Linux Kernel Mailing List | ARM: DaVinci: i2c setup |
| Linux Kernel Mailing List | [MACVLAN]: Update Kconfig to refer to iproute |
git: | |
| Sverre Rabbelier | Git vs Monotone |
| Jakub Narebski | Re: [RFC] origin link for cherry-pick and revert |
| Jan-Benedict Glaw | Re: Errors GITtifying GCC and Binutils |
| H. Peter Anvin | Re: tip tree clone fail |
| jamal | Re: [PATCH 0/10 REV5] Implement skb batching and support in IPoIB/E1000 |
| KOVACS Krisztian | [net-next PATCH 01/16] Loosen source address check on IPv4 output |
| Ilpo Järvinen | Re: [bug] stuck localhost TCP connections, v2.6.26-rc3+ |
| Andrew Bird (Sphere Systems) | Re: [RFC] Patch to option HSO driver to the kernel |
| sata/ide timeout errors on asus server-mb | 2 hours ago | Linux kernel |
| Shared swap partition | 2 hours ago | Linux general |
| usb mic not detected | 7 hours ago | Applications and Utilities |
| Problem in Inserting a module | 8 hours ago | Linux kernel |
| Treason Uncloaked | 13 hours ago | Linux kernel |
| high memory | 2 days ago | Linux kernel |
| semaphore access speed | 2 days ago | Applications and Utilities |
| the kernel how to power off the machine | 3 days ago | Linux kernel |
| Easter Eggs in windows XP | 3 days ago | Windows |
| Root password | 3 days ago | Linux general |
