Hugh Dickins wrote:Yes, depending on the number of cgroups, we'll need to share swap areas between them. It requires more work and thought process. in-cgroup pressure will not affect them, since they are in different cgroups. If there is pressure in the cgroup to which they are wrongly assigned, they would get reclaimed first. You are right, at this point I am beginning to wonder if I should account for the swap cache at all? We account for the pages in RSS and when the page comes back into the page table(s) via do_swap_page. If we believe that the swap cache is transitional and the current expected working behaviour does not seem right or hard to fix, it might be easy to ignore unuse_pte() and add/remove_from_swap_cache() for accounting and control. The expected working behaviour of the memory controller is that currently, as you point out several pages get accounted to the cgroup that initiates swapin readahead or swapoff. On cgroup pressure (the one that initiated swapin or swapoff), the cgroup would discard these pages first. These pages are discarded from the cgroup, but still live on the global LRU. When the original cgroup is under pressure, these pages might not be effected as they belong to a different cgroup, which might not be under any sort of pressure. I am also assuming MEM_CGROUP_TYPE_ALL for the purpose of our discussion. The accounting is split into mem_cgroup_charge() and mem_cgroup_cache_charge(). While charging the caches is when we check for the control_type. The swapin readahead code under #ifdef NUMA is very confusing. I also noticed another confusing thing during my test, swap cache does not drop to 0, even though I've disabled all swap using swapoff. May be those are tmpfs pages. The other interesting thing I tried was running swapoff after a cgroup went over it's limit, the swapoff succeeded, but I see strange numbers for free swap. I'll start another thread after investigating a bit more. I meant for the wrong cgroup, in the wrong cgroup, these will be the first set of pages to be reclaimed. -- Warm Regards, Balbir Singh Linux Technology Center IBM, ISTL -
| David Miller | [GIT]: Networking |
| Fred . | Please add ZFS support (from GPL sources) |
| Rusty Russell | Re: [patch 13/26] Xen-paravirt_ops: Consistently wrap paravirt ops callsites to ma... |
| Amit K. Arora | [RFC] Heads up on sys_fallocate() |
| Neng-Yu Tu (Tony Tu) | GTA02 GPS rework for SD card interference issue |
| nickd | Re: My experience with the Freerunner |
| Flemming Richter Mikkelsen | Re: QVGA V/s VGA for GTA03 (was something about yummy CPU-GPU combos!) |
| cedric cellier | Re: comparing Apples and Oranges $199 iPhone Freerunner GTA02 |
git: | |
| Toby White | Using Filemerge.app as a git-diff viewer |
| Nicolas Pitre | Re: Cleaning up git user-interface warts |
| Jon Smirl | ! [rejected] master -> master (non-fast forward) |
| Abdelrazak Younes | Git-windows and git-svn? |
| Kevin Stam | Re: Code signing in OpenBSD |
| GVG GVG | ssh_exchange_identification: Connection closed by remote host |
| christian johansson | openbsd on a geode |
| Karel Kulhavy | lookup option in /etc/resolv.conf ignored |
| Linux Bootup hangs after adding RealTime Premption and HR-Timer | 18 minutes ago | Linux kernel |
| SATA 2 size problems | 35 minutes ago | Windows |
| problem with 2.6 kernel driver for a USB MAG Stripe Reader as HID device. | 13 hours ago | Linux kernel |
| get_user_pages failure | 14 hours ago | Linux kernel |
| Reading linux kernel | 15 hours ago | Linux kernel |
| High level of Seagate 2.5" SATA drives failing | 21 hours ago | Hardware |
| Resetting the bios password for Toshiba Laptop | 1 day ago | Hardware |
| Linux 2.6.22 slowly RUNS OUT OF LOWMEM | 1 day ago | Linux kernel |
| Questions about modules | 1 day ago | Linux kernel |
| KDB | 2 days ago | Linux kernel |
