linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Juan J. Quintela" <quintela@fi.udc.es>
To: Christoph Rohland <cr@sap.com>,
	linux-kernel@vger.rutgers.edu, linux-mm@kvack.org
Subject: PATCH: SHM Bug in Highmem machines
Date: 10 May 2000 04:14:30 +0200	[thread overview]
Message-ID: <ytt4s87tam1.fsf@vexeta.dc.fi.udc.es> (raw)

Hi
        I think that SHM can't work in recent kernels, due to the fact 
that We call prepare_highmem_swapout without locking the page (that is
necesary with the new semantics).  If we don't do that change, the
page returned by prepare_highmem_swapout will be already
locked and our call to lock will sleep forever.

Later, Juan.

PD. Christoph, could you see if that helps your problems (you are the only
person that I know that use highmem & shm).

--- pre7-8/ipc/shm.c	Tue May  9 13:20:26 2000
+++ testing/ipc/shm.c	Wed May 10 04:11:00 2000
@@ -1428,6 +1428,7 @@
 	if (page_count(page_map) != 1)
 		return RETRY;
 
+	lock_page(page_map);
 	if (!(page_map = prepare_highmem_swapout(page_map)))
 		return FAILED;
 	SHM_ENTRY (shp, idx) = swp_entry_to_pte(swap_entry);
@@ -1437,7 +1438,6 @@
 	   reading a not yet uptodate block from disk.
 	   NOTE: we just accounted the swap space reference for this
 	   swap cache page at __get_swap_page() time. */
-	lock_page(page_map);
 	add_to_swap_cache(*outpage = page_map, swap_entry);
 	return OKAY;
 }

-- 
In theory, practice and theory are the same, but in practice they 
are different -- Larry McVoy
--
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.eu.org/Linux-MM/

             reply	other threads:[~2000-05-10  2:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-05-10  2:14 Juan J. Quintela [this message]
2000-05-10 11: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=ytt4s87tam1.fsf@vexeta.dc.fi.udc.es \
    --to=quintela@fi.udc.es \
    --cc=cr@sap.com \
    --cc=linux-kernel@vger.rutgers.edu \
    --cc=linux-mm@kvack.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