* PATCH: SHM Bug in Highmem machines
@ 2000-05-10 2:14 Juan J. Quintela
2000-05-10 11:17 ` Christoph Rohland
0 siblings, 1 reply; 2+ messages in thread
From: Juan J. Quintela @ 2000-05-10 2:14 UTC (permalink / raw)
To: Christoph Rohland, linux-kernel, linux-mm
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/
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: PATCH: SHM Bug in Highmem machines
2000-05-10 2:14 PATCH: SHM Bug in Highmem machines Juan J. Quintela
@ 2000-05-10 11:17 ` Christoph Rohland
0 siblings, 0 replies; 2+ messages in thread
From: Christoph Rohland @ 2000-05-10 11:17 UTC (permalink / raw)
To: Juan J. Quintela; +Cc: linux-kernel, linux-mm
Hi juan,
"Juan J. Quintela" <quintela@fi.udc.es> writes:
> 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).
Yes, your patch fixes the lockup.
Thanks
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://www.linux.eu.org/Linux-MM/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2000-05-10 11:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-05-10 2:14 PATCH: SHM Bug in Highmem machines Juan J. Quintela
2000-05-10 11:17 ` Christoph Rohland
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox