Linux Container Development
 help / color / mirror / Atom feed
From: Balbir Singh <balbir-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
To: Hugh Dickins <hugh-DTz5qymZ9yRBDgjK7y7TUQ@public.gmane.org>
Cc: Linux Containers
	<containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org>,
	Linux MM Mailing List
	<linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org>
Subject: Re: [RFC] [-mm PATCH] Memory controller fix swap charging context in unuse_pte()
Date: Wed, 24 Oct 2007 17:44:42 +0530	[thread overview]
Message-ID: <471F3732.5050407@linux.vnet.ibm.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0710221933570.21262-VFT1Jj/mpSzq8/QPP7pA5326JSxr+BKB@public.gmane.org>

Hugh Dickins wrote:
> 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-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
> 
> 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.
> 

No Problem. We have some time with this one.

> 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.
> 

Yes, in my case there I use memory less than RAM and more than that
is allowed by the cgroup. It's quite possible that in your case the
swapcache has grown significantly without any limit/control on it.
The memhog program is using memory at a rate much higher than the
rate of reclaim. Could you share your memhog program, please?
In the use case you've mentioned/tested, having these mods to
control swapcache is actually useful, right?

Could you share your major objections at this point with the memory
controller at this point. I hope to be able to look into/resolve them
as my first priority in my list of items to work on.


> Hugh


-- 
	Warm Regards,
	Balbir Singh
	Linux Technology Center
	IBM, ISTL

  parent reply	other threads:[~2007-10-24 12:14 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-05  4:14 [RFC] [-mm PATCH] Memory controller fix swap charging context in unuse_pte() Balbir Singh
2007-10-07 16:57 ` Hugh Dickins
     [not found]   ` <Pine.LNX.4.64.0710071735530.13138-VFT1Jj/mpSzq8/QPP7pA5326JSxr+BKB@public.gmane.org>
2007-10-07 17:48     ` Balbir Singh
2007-10-15 17:27     ` Balbir Singh
     [not found]       ` <4713A2F2.1010408-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2007-10-22 18:51         ` Hugh Dickins
     [not found]           ` <Pine.LNX.4.64.0710221933570.21262-VFT1Jj/mpSzq8/QPP7pA5326JSxr+BKB@public.gmane.org>
2007-10-24 12:14             ` Balbir Singh [this message]
     [not found]               ` <471F3732.5050407-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2007-10-25 19:33                 ` Hugh Dickins
     [not found]                   ` <Pine.LNX.4.64.0710252002540.25735-VFT1Jj/mpSzq8/QPP7pA5326JSxr+BKB@public.gmane.org>
2007-10-26  6:14                     ` Balbir Singh
     [not found]                   ` <4724F0BC.1020209@linux.vnet.ibm.com>
     [not found]                     ` <4724F0BC.1020209-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2007-10-28 20:32                       ` Balbir Singh
     [not found]                         ` <20071028203219.GA7145-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2007-10-29 21:07                           ` Hugh Dickins
     [not found]                             ` <Pine.LNX.4.64.0710292101510.23980-VFT1Jj/mpSzq8/QPP7pA5326JSxr+BKB@public.gmane.org>
2007-10-29 22:01                               ` Balbir Singh
     [not found]                                 ` <47265842.5040506-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2007-10-30 16:57                                   ` Hugh Dickins
     [not found]                                     ` <Pine.LNX.4.64.0710301635290.11007-VFT1Jj/mpSzq8/QPP7pA5326JSxr+BKB@public.gmane.org>
2007-10-30 18:28                                       ` Balbir Singh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=471F3732.5050407@linux.vnet.ibm.com \
    --to=balbir-23vcf4htsmix0ybbhkvfkdbpr1lh4cv8@public.gmane.org \
    --cc=containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org \
    --cc=hugh-DTz5qymZ9yRBDgjK7y7TUQ@public.gmane.org \
    --cc=linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox