All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Dmitry Fink (Palm GBU)" <Dmitry.Fink@palm.com>
To: Minchan Kim <minchan.kim@gmail.com>, Dmitry Fink <finikk@gmail.com>
Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/1] mmap: Don't count shmem pages as free in __vm_enough_memory
Date: Sun, 3 Jul 2011 20:10:32 -0700	[thread overview]
Message-ID: <CA367A4F.1479D%dmitry.fink@palm.com> (raw)
In-Reply-To: <CAEwNFnAYAWy4tabCuzGUwXjLpZVbxhKMmPXnhmCuH5pckOXBRw@mail.gmail.com>

If I understand the logic correctly, even systems with swap set to
OVERCOMMIT_GUESS are equally affected,
what we are trying to do here is count the amount of immediately available
and
"potentially" available space both in memory and in swap. shmem is not
immediately
available, but it is not potentially available either, even if we swap it
out, it will
just be relocated from memory into swap, total amount of immediate and
potentially
available memory is not going to be affected, so we shouldn't count it as
available
in the first place.

Dmitry

On 7/3/11 5:43 PM, "Minchan Kim" <minchan.kim@gmail.com> wrote:

>On Mon, Jul 4, 2011 at 4:39 AM, Dmitry Fink <finikk@gmail.com> wrote:
>> shmem pages can't be reclaimed and if they are swapped out
>> that doesn't affect the overall available memory in the system,
>> so don't count them along with the rest of the file backed pages.
>>
>> Signed-off-by: Dmitry Fink <dmitry.fink@palm.com>
>Reviewed-by: Minchan Kim <minchan.kim@gmail.com>
>
>I am not sure the description is good. :(
>But I think this patch is reasonable.
>
>In swapless system,guessing overcommit can have a problem.
>And in current implementation of OVERCOMMIT_GUESS, we consider anon
>pages as empty space of swap so shmem pages should be accounted by
>that.
>
>-- 
>Kind regards,
>Minchan Kim


WARNING: multiple messages have this Message-ID (diff)
From: "Dmitry Fink (Palm GBU)" <Dmitry.Fink@palm.com>
To: Minchan Kim <minchan.kim@gmail.com>, Dmitry Fink <finikk@gmail.com>
Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/1] mmap: Don't count shmem pages as free in __vm_enough_memory
Date: Sun, 3 Jul 2011 20:10:32 -0700	[thread overview]
Message-ID: <CA367A4F.1479D%dmitry.fink@palm.com> (raw)
In-Reply-To: <CAEwNFnAYAWy4tabCuzGUwXjLpZVbxhKMmPXnhmCuH5pckOXBRw@mail.gmail.com>

If I understand the logic correctly, even systems with swap set to
OVERCOMMIT_GUESS are equally affected,
what we are trying to do here is count the amount of immediately available
and
"potentially" available space both in memory and in swap. shmem is not
immediately
available, but it is not potentially available either, even if we swap it
out, it will
just be relocated from memory into swap, total amount of immediate and
potentially
available memory is not going to be affected, so we shouldn't count it as
available
in the first place.

Dmitry

On 7/3/11 5:43 PM, "Minchan Kim" <minchan.kim@gmail.com> wrote:

>On Mon, Jul 4, 2011 at 4:39 AM, Dmitry Fink <finikk@gmail.com> wrote:
>> shmem pages can't be reclaimed and if they are swapped out
>> that doesn't affect the overall available memory in the system,
>> so don't count them along with the rest of the file backed pages.
>>
>> Signed-off-by: Dmitry Fink <dmitry.fink@palm.com>
>Reviewed-by: Minchan Kim <minchan.kim@gmail.com>
>
>I am not sure the description is good. :(
>But I think this patch is reasonable.
>
>In swapless system,guessing overcommit can have a problem.
>And in current implementation of OVERCOMMIT_GUESS, we consider anon
>pages as empty space of swap so shmem pages should be accounted by
>that.
>
>-- 
>Kind regards,
>Minchan Kim

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2011-07-04  3:20 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-03 19:39 [PATCH 1/1] mmap: Don't count shmem pages as free in __vm_enough_memory Dmitry Fink
2011-07-03 19:39 ` Dmitry Fink
2011-07-04  0:43 ` Minchan Kim
2011-07-04  0:43   ` Minchan Kim
2011-07-04  3:10   ` Dmitry Fink (Palm GBU) [this message]
2011-07-04  3:10     ` Dmitry Fink (Palm GBU)
2011-07-04  3:48     ` Minchan Kim
2011-07-04  3:48       ` Minchan Kim
2011-07-08 22:22 ` Hugh Dickins
2011-07-08 22:22   ` Hugh Dickins
2011-07-09 20:42   ` [PATCH] mmap: Fix and tidy up overcommit page arithmetic Dmitry Fink
2011-07-09 20:42     ` Dmitry Fink
2011-07-09 20:55     ` Dmitry Fink
2011-07-09 20:55       ` Dmitry Fink
2011-07-10 23:08       ` Minchan Kim
2011-07-10 23:08         ` Minchan Kim
2011-07-11  1:41         ` Dmitry Fink
2011-07-11  1:41           ` Dmitry Fink
2011-07-11 17:33           ` Hugh Dickins
2011-07-11 17:33             ` Hugh Dickins

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=CA367A4F.1479D%dmitry.fink@palm.com \
    --to=dmitry.fink@palm.com \
    --cc=finikk@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=minchan.kim@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.