linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Rohland <hans-christoph.rohland@sap.com>
To: Ingo Molnar <mingo@chiara.csoma.elte.hu>
Cc: MM mailing list <linux-mm@kvack.org>, woodman@missioncriticallinux.com
Subject: Re: [Patch] shm cleanups
Date: 04 Nov 1999 13:40:11 +0100	[thread overview]
Message-ID: <qwwu2n2ctw4.fsf@sap.com> (raw)
In-Reply-To: Ingo Molnar's message of "Thu, 4 Nov 1999 09:10:46 +0100 (CET)"

Hi Ingo,

Ingo Molnar <mingo@chiara.csoma.elte.hu> writes:

> On 3 Nov 1999, Christoph Rohland wrote:
> 
> > I did test it a lot on SMP/HIGHMEM. Since 2.3.25 with and without this
> > breaks on swapping shm and other high memory load conditions I could
> > not verify everything. But I would like to see this in the mainstream
> > kernel. I will then proceed debugging the swapping issues.
> 
> (i can see the problems too, but i've got no explanation either, working
> on it as well.)
> 
> -- mingo

After applying the following patch against ipc/shm.c (thanks to Larry
Woodman <woodman@missioncriticallinux.com> for the first one):

--- 2.3.25/ipc/shm.c    Tue Nov  2 12:46:29 1999
+++ make25/ipc/shm.c    Thu Nov  4 12:47:14 1999
@@ -788,10 +789,10 @@
                unlock_kernel();
                return 0;
        }
-       if (page_count(page_map))
+       if (page_count(page_map) != 1)
                goto check_table;
        if (!(page_map = prepare_highmem_swapout(page_map)))
-               goto check_table;
+               goto failed;
        shp->shm_pages[idx] = swp_entry_to_pte(swap_entry);
        swap_successes++;
        shm_swp++;
791c791
< 	if (page_count(page_map))
---
> 	if (page_count(page_map) != 1)

I get the same behaviour for shm swapping as on 2.3.22 as long as I
only use 1G memory (HIGHMEM setting is always 64GB).

I do get swapping also with 8GB of RAM, but it runs out of memory
before running out of swap space since prepare_highmem_swapout is
failing way to often.

(It then locks up since it cannot free the shm segments and so is
unable to free the memory. This should be perhaps addressed later in
the oom handler. It cannot handle the case where nearly all memory is
allocted in shm segments)

Greetings
          Christoph
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://humbolt.geo.uu.nl/Linux-MM/

  reply	other threads:[~1999-11-04 12:40 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-11-03 21:30 Christoph Rohland
1999-11-04  8:10 ` Ingo Molnar
1999-11-04 12:40   ` Christoph Rohland [this message]
1999-11-04 17:58     ` Ingo Molnar
1999-11-04 19:02       ` Rik van Riel
1999-11-04 22:30         ` Ingo Molnar
1999-11-05  0:14           ` Andrea Arcangeli
1999-11-05 12:35             ` Christoph Rohland
1999-11-05 13:18               ` Andrea Arcangeli
1999-11-05 16:16                 ` Christoph Rohland
1999-11-05 16:21                   ` Andrea Arcangeli
1999-11-05 16:28                     ` Christoph Rohland
1999-11-05 10:36           ` Christoph Rohland
  -- strict thread matches above, loose matches on Subject: below --
1999-11-03 19:17 Christoph Rohland

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=qwwu2n2ctw4.fsf@sap.com \
    --to=hans-christoph.rohland@sap.com \
    --cc=linux-mm@kvack.org \
    --cc=mingo@chiara.csoma.elte.hu \
    --cc=woodman@missioncriticallinux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox