linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* page_launder() bug
@ 2001-05-06 21:08 BERECZ Szabolcs
  2001-05-06 21:59 ` Jonathan Morton
                   ` (3 more replies)
  0 siblings, 4 replies; 104+ messages in thread
From: BERECZ Szabolcs @ 2001-05-06 21:08 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-mm

Hi!

there is a bug in page_launder introduced with kernel 2.4.3-ac12.
if the swapfile is on a filesystem, then after swapping out some
pages, the system locks up. sometimes it writes an oops message.
I don't know exactly what's the problem, but with the attached
patch it works. (this is just a reverse patch to go back to
pre 2.4.3-ac12, and it's against 2.4.4-ac5)
please fix the bug, or apply this patch until fixed properly.

a question:
why don't you include lkcd or something like that in the
mainstream kernel? it would be much easier to save those annoying
oopses :)

Bye,
Szabi


diff -Nur linux/mm/vmscan.c linux.swapfix/mm/vmscan.c
--- linux/mm/vmscan.c	Sun May  6 15:59:22 2001
+++ linux.swapfix/mm/vmscan.c	Sun May  6 16:07:09 2001
@@ -448,15 +448,9 @@
 	maxscan = nr_inactive_dirty_pages;
 	while ((page_lru = inactive_dirty_list.prev) != &inactive_dirty_list &&
 				maxscan-- > 0) {
-		int dead_swap_page;
-
 		page = list_entry(page_lru, struct page, lru);
 		zone = page->zone;

-		dead_swap_page =
-			(PageSwapCache(page) &&
-			 page_count(page) == (1 + !!page->buffers));
-
 		/* Wrong page on list?! (list corruption, should not happen) */
 		if (!PageInactiveDirty(page)) {
 			printk("VM: page_launder, wrong page on list.\n");
@@ -467,10 +461,9 @@
 		}

 		/* Page is or was in use?  Move it to the active list. */
-		if (!dead_swap_page &&
-		    (PageTestandClearReferenced(page) || page->age > 0 ||
-		     (!page->buffers && page_count(page) > 1) ||
-		     page_ramdisk(page))) {
+		if (PageTestandClearReferenced(page) || page->age > 0 ||
+				(!page->buffers && page_count(page) > 1) ||
+				page_ramdisk(page)) {
 			del_page_from_inactive_dirty_list(page);
 			add_page_to_active_list(page);
 			continue;
@@ -512,11 +505,8 @@
 			if (!writepage)
 				goto page_active;

-			/* First time through? Move it to the back of the list,
-			 * but not if it is a dead swap page. We want to reap
-			 * those as fast as possible.
-			 */
-			if (!launder_loop && !dead_swap_page) {
+			/* First time through? Move it to the back of the list */
+			if (!launder_loop) {
 				list_del(page_lru);
 				list_add(page_lru, &inactive_dirty_list);
 				UnlockPage(page);


^ permalink raw reply	[flat|nested] 104+ messages in thread
* Re: [VM/MEMORY-SICKNESS] 2.4.15-pre7 kmem_cache_create invalid opcode
@ 2001-11-21  6:59 Jeff Merkey
  0 siblings, 0 replies; 104+ messages in thread
From: Jeff Merkey @ 2001-11-21  6:59 UTC (permalink / raw)
  To: Jeff Merkey, jmerkey, David S. Miller; +Cc: linux-kernel

> > You are really a fucking pain in the ass to help Jeff.
>
> Dave,  I went and looked at this stuff.  I have been running this code for
> over a year on 2.4 and I AM NOT CREATING A SLAB CACHE TWICE!!!!
> I am building an NWFS module external of the kernel tree, and unless make
> dep
> has been run, the default behavior of the includes causes me to drop into
> the
> BUG() trap.

This is a bug in how these includes are structured.  It may be ok to leave
the damn
thing the way it is, but warn folks who build custom drivers (like the SCI
drivers I
maintain for Dolphin, NWFS, etc.) that their f_cking code will be broken and
generate these garbage errors if they have not run make dep against the tree
they
try to build against.

I would not have expected you or most LKML folks to have seen this, since
you live
in a world where everything is in the kernel tree.   I am telling you there
is a problem there,
and it can bite.  After I build this module (since the generated code thatr
ends up in
the external module is crap) it will routinely crash over and over gain
until it gets rebuilt
against a kernel that has had make dep (and make bzImage) run against it.

Jeff

>
> Jeff
>
>
> > -
> > To unsubscribe from this list: send the line "unsubscribe linux-kernel"
in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> > Please read the FAQ at  http://www.tux.org/lkml/
>


^ permalink raw reply	[flat|nested] 104+ messages in thread

end of thread, other threads:[~2001-11-21 21:30 UTC | newest]

Thread overview: 104+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-06 21:08 page_launder() bug BERECZ Szabolcs
2001-05-06 21:59 ` Jonathan Morton
2001-05-06 22:07   ` BERECZ Szabolcs
2001-05-07  4:55 ` David S. Miller
2001-05-07  5:19   ` Aaron Lehmann
2001-05-07  6:26   ` Tobias Ringstrom
2001-05-07  8:59     ` Helge Hafting
2001-05-07 19:02       ` J . A . Magallon
2001-05-08  7:52         ` Helge Hafting
2001-05-10 12:19           ` Ingo Oeser
2001-05-10 10:51         ` Anuradha Ratnaweera
2001-05-07 10:52     ` Alan Cox
2001-05-07 13:49     ` Daniel Phillips
2001-05-07 13:53     ` H. Peter Anvin
2001-05-07  8:54   ` David S. Miller
2001-05-07 15:12     ` Tobias Ringstrom
2001-05-07 14:52   ` Horst von Brand
     [not found]     ` <davem@redhat.com>
2001-11-21  7:16       ` [VM/MEMORY-SICKNESS] 2.4.15-pre7 kmem_cache_create invalid opcode Jeff V. Merkey
2001-11-21  6:22         ` David S. Miller
2001-11-21  6:47           ` David S. Miller
2001-11-21  6:54             ` Jeff Merkey
2001-11-21  6:56             ` David S. Miller
2001-11-21  7:03               ` Jeff Merkey
2001-11-21  7:49                 ` arjan
2001-11-21 18:31                   ` Jeff Merkey
2001-11-21 19:06                     ` Doug Ledford
2001-11-21 19:51                       ` Jeff Merkey
2001-11-21 19:58                         ` J Sloan
2001-11-21 20:38                         ` Doug Ledford
2001-11-21 21:17                           ` Jeff Merkey
2001-11-21 19:16                     ` Arjan van de Ven
2001-11-21 19:53                       ` Jeff Merkey
2001-11-21 20:36                         ` Doug Ledford
2001-11-21 21:16                           ` Jeff Merkey
2001-11-21 21:28                           ` Robert Love
2001-11-21  7:09               ` David S. Miller
2001-11-21  7:14                 ` Jeff Merkey
2001-11-21  7:28               ` Stuart Young
2001-11-21  7:33           ` Jeff V. Merkey
2001-11-21  6:54             ` Chris Abbey
2001-11-21  7:05               ` Jeff Merkey
2001-11-21  6:47         ` Kai Henningsen
2001-11-21 18:28           ` Jeff Merkey
2001-11-21  8:49         ` Alan Cox
2001-11-21 18:28           ` Jeff Merkey
2001-05-08 17:59   ` page_launder() bug Kai Henningsen
2001-05-09  2:32   ` Rusty Russell
2001-05-09  8:43     ` Martin Dalecki
2001-05-09  3:36   ` Jonathan Morton
2001-05-07 17:59 ` Linus Torvalds
2001-05-07 21:22   ` Marcelo Tosatti
2001-05-07 23:23     ` Linus Torvalds
2001-05-07 21:50       ` Marcelo Tosatti
2001-05-07 23:52         ` Linus Torvalds
2001-05-07 22:26           ` Marcelo Tosatti
2001-05-08  2:29             ` Linus Torvalds
2001-05-13 16:08               ` Rik van Riel
2001-05-13 19:29                 ` Linus Torvalds
2001-05-14 22:05                   ` Marcelo Tosatti
2001-05-08  0:16           ` David S. Miller
2001-05-08  2:34             ` Linus Torvalds
2001-05-08  1:40               ` Marcelo Tosatti
2001-05-08  3:46                 ` Linus Torvalds
2001-05-08  2:37                   ` Marcelo Tosatti
2001-05-08 21:16                   ` Marcelo Tosatti
2001-05-08 23:38                     ` Linus Torvalds
2001-05-08 23:53                       ` Marcelo Tosatti
2001-05-09  2:13                       ` David S. Miller
2001-05-09 17:38                         ` Marcelo Tosatti
2001-05-09 20:05                         ` David S. Miller
2001-05-09 18:40                           ` Marcelo Tosatti
2001-05-09 21:08                           ` David S. Miller
2001-05-09 19:50                             ` Marcelo Tosatti
2001-05-13 16:34                         ` Rik van Riel
2001-05-13 19:34                           ` Linus Torvalds
2001-05-13 19:39                             ` Rik van Riel
2001-05-13 20:42                               ` Linus Torvalds
2001-05-14  7:05                                 ` Kai Henningsen
2001-05-13 17:52                         ` David S. Miller
2001-05-13 17:55                           ` Rik van Riel
2001-05-13 18:00                           ` David S. Miller
2001-05-08  6:50                 ` David S. Miller
2001-05-08  7:40                   ` Linus Torvalds
2001-05-08 18:53                     ` Marcelo Tosatti
2001-05-08  8:29                   ` David S. Miller
2001-05-08  3:22               ` David S. Miller
2001-05-08  3:26                 ` Linus Torvalds
2001-05-08  2:47             ` David S. Miller
2001-05-08  1:34               ` Marcelo Tosatti
2001-05-08  3:18               ` David S. Miller
2001-05-08  1:47                 ` Marcelo Tosatti
2001-05-08  3:24                 ` Linus Torvalds
2001-05-08  3:29                 ` David S. Miller
2001-05-08 10:36                   ` BERECZ Szabolcs
2001-05-08 12:33             ` Mikulas Patocka
2001-05-13 16:24               ` Rik van Riel
2001-05-13 21:02                 ` Another VM race? (was: page_launder() bug) Mikulas Patocka
2001-05-13 23:04                   ` Rik van Riel
2001-05-14  9:53                     ` Mikulas Patocka
2001-05-08  0:06         ` page_launder() bug David S. Miller
2001-05-07 23:31     ` David S. Miller
2001-05-07 22:44 ` David S. Miller
2001-05-08  1:00   ` Horst von Brand
2001-11-21  6:59 [VM/MEMORY-SICKNESS] 2.4.15-pre7 kmem_cache_create invalid opcode Jeff Merkey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).