From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755219Ab1GDDUn (ORCPT ); Sun, 3 Jul 2011 23:20:43 -0400 Received: from smtp-relay1.palm.com ([63.80.53.70]:24048 "EHLO smtp-relay1.palm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752978Ab1GDDUm convert rfc822-to-8bit (ORCPT ); Sun, 3 Jul 2011 23:20:42 -0400 X-Greylist: delayed 596 seconds by postgrey-1.27 at vger.kernel.org; Sun, 03 Jul 2011 23:20:42 EDT X-IronPort-AV: E=Sophos;i="4.65,470,1304319600"; d="scan'208";a="37002322" From: "Dmitry Fink (Palm GBU)" To: Minchan Kim , Dmitry Fink CC: "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" Date: Sun, 3 Jul 2011 20:10:32 -0700 Subject: Re: [PATCH 1/1] mmap: Don't count shmem pages as free in __vm_enough_memory Thread-Topic: [PATCH 1/1] mmap: Don't count shmem pages as free in __vm_enough_memory Thread-Index: Acw59/FNaTrVXhvITjS7iydQbOLIxw== Message-ID: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.12.0.110505 acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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" wrote: >On Mon, Jul 4, 2011 at 4:39 AM, Dmitry Fink 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 >Reviewed-by: Minchan Kim > >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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail203.messagelabs.com (mail203.messagelabs.com [216.82.254.243]) by kanga.kvack.org (Postfix) with ESMTP id C21D89000C2 for ; Sun, 3 Jul 2011 23:10:44 -0400 (EDT) From: "Dmitry Fink (Palm GBU)" Date: Sun, 3 Jul 2011 20:10:32 -0700 Subject: Re: [PATCH 1/1] mmap: Don't count shmem pages as free in __vm_enough_memory Message-ID: In-Reply-To: Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: owner-linux-mm@kvack.org List-ID: To: Minchan Kim , Dmitry Fink Cc: "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" 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" wrote: >On Mon, Jul 4, 2011 at 4:39 AM, Dmitry Fink 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 >Reviewed-by: Minchan Kim > >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. > >--=20 >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: email@kvack.org