OpenVZ Forum


Home » Mailing lists » Devel » [RFC] [-mm PATCH] Memory controller fix swap charging context in unuse_pte()
Re: [RFC] [-mm PATCH] Memory controller fix swap charging context in unuse_pte() [message #22167 is a reply to message #21742] Mon, 22 October 2007 18:51 Go to previous messageGo to previous message
Hugh Dickins is currently offline  Hugh Dickins
Messages: 16
Registered: September 2007
Junior Member
On Mon, 15 Oct 2007, Balbir Singh wrote:
> Hugh Dickins wrote:
> > 
> > --- 2.6.23-rc8-mm2/mm/swapfile.c	2007-09-27 12:03:36.000000000 +0100
> > +++ linux/mm/swapfile.c	2007-10-07 14:33:05.000000000 +0100
> > @@ -507,11 +507,23 @@ unsigned int count_swap_pages(int type, 
> >   * just let do_wp_page work it out if a write is requested later - to
> >   * force COW, vm_page_prot omits write permission from any private vma.
> >   */
> > -static int unuse_pte(struct vm_area_struct *vma, pte_t *pte,
> > +static int unuse_pte(struct vm_area_struct *vma, pmd_t *pmd,
> >  		unsigned long addr, swp_entry_t entry, struct page *page)
...
> 
> I tested this patch and it seems to be working fine. I tried swapoff -a
> in the middle of tests consuming swap. Not 100% rigorous, but a good
> test nevertheless.
> 
> Tested-by: Balbir Singh <balbir@linux.vnet.ibm.com>

Thanks, Balbir.  Sorry for the delay.  I've not forgotten our
agreement that I should be splitting it into before-and-after
mem cgroup patches.  But it's low priority for me until we're
genuinely assigning to a cgroup there.  Hope to get back to
looking into that tomorrow, but no promises.

I think you still see no problem, where I claim that simply
omitting the mem charge mods from mm/swap_state.c leads to OOMs?
Maybe our difference is because my memhog in the cgroup is using
more memory than RAM, not just more memory than allowed to the
cgroup.  I suspect that arrives at a state (when the swapcache
pages are not charged) where it cannot locate the pages it needs
to reclaim to stay within its limit.

Hugh
_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [PATCH][NETNS] release net when pneigh_lookup fails
Next Topic: [patch 1/1][NETNS] resend: fix net released by rcu callback
Goto Forum:
  


Current Time: Sun Jul 20 02:26:24 GMT 2025

Total time taken to generate the page: 0.07319 seconds