Subject: kernel panic in kswapd

From: "Naik, Uday" <[email-masked]>
Date: Tue, 25 Apr 2000 18:17:18 -0700

I seem to be getting a kernel panic in kswapd. Since I don't
have a harddisk, I would like to turn swapping off. How do
I build the kernel that way. I don't see a configuration option
for it. 

Also I am using the ramdisk image put out by nicolas as an initrd
image. Linux seems to gunzip it fine. But when it tries to mount
it as the root file system it gets the error as follows

EXT2-fs error (device ramdisk(1,0)): ext2-check-descriptors: block 
bitmap for group 0 not in group (block 33188) !

Any ideas ???

Uday Naik 

---

All opinions expressed are mine and do not reflect those of my employer.

unsubscribe: body of `unsubscribe linux-arm' to [email-masked]
++        Please use [email-masked] for           ++
++                        kernel-related discussions.                      ++

---

From: Philip Blundell <[email-masked]>
Date: Wed, 26 Apr 2000 09:53:28 +0100

In message <[email-masked]>, "N
>I build the kernel that way. I don't see a configuration option

If you haven't done `swapon' then no swapping will actually happen (though 
kswapd will still exist).  A kernel panic inside kswapd is indicative of some 
deeper problem; if you post the details maybe someone can work out what's 
going on.

p.

---

From: Nicolas Pitre <[email-masked]>
Date: Wed, 26 Apr 2000 11:48:08 -0400 (EDT)

Please give more information about your setup please.

---

From: Russell King - ARM Linux Admin <[email-masked]>
Date: Wed, 26 Apr 2000 19:37:48 +0100 (BST)

Philip Blundell writes:
> kswapd will still exist).  A kernel panic inside kswapd is indicative of
> some deeper problem; if you post the details maybe someone can work out
> what's going on.

Not quite true - it depends on whether you define "swapping" to mean
"removing pages from memory and placing then in a file" or if you
mean just "removing unused pages from memory".  The latter would be a
better definition of kswapd's job, which it is able to perform without
any swap file or swap partition.
   _____
  |_____| ------------------------------------------------- ---+---+-
  |   |        Russell King       [email-masked]      --- ---
  | | | |            http://www.arm.linux.org.uk/            /  /  |
  | +-+-+                                                     --- -+-
  /   |               THE developer of ARM Linux              |+| /|\
 /  | | |                                                     ---  |
    +-+-+ -------------------------------------------------  /\\\  |

---

From: Russell King - ARM Linux Admin <[email-masked]>
Date: Wed, 26 Apr 2000 10:00:44 +0100 (BST)

> I build the kernel that way. I don't see a configuration option

The short answer is: no.  The long answer is: swapping is an embedded
part of the Linux kernel, and is not trivial to turn off.  The fact that
you don't have any swap space doesn't mean that this code is redundant.
This code is also used to page out clean pages when memory gets tight.
These pages are areas such as the text sections of user executables and
libraries which have not been written to by user code.

Therefore, disabling the kernels "swapping" code would have a far more
serious impact than having no swap enabled.

However, wrt your kernel panic, I believe that Nicolas Pitre found an
error during initialisation.  One possible fix is to add a schedule()
call just after the kswapd kernel thread is created (by kernel_thread).
Could you let us know the kernel version you're seeing this problem on?

> bitmap for group 0 not in group (block 33188) !

I guess that the ramdisk could be corrupted.  Maybe you could gunzip it
manually and force e2fsck to run on it?  If e2fsck indicates that the
ramdisk is ok, maybe there is a hardware fault on your machine?
   _____
  |_____| ------------------------------------------------- ---+---+-
  |   |        Russell King       [email-masked]      --- ---
  | | | |  http://www.arm.linux.org.uk/~rmk/armlinux.html    /  /  |
  | +-+-+                                                     --- -+-
  /   |               THE developer of ARM Linux              |+| /|\
 /  | | |                                                     ---  |
    +-+-+ -------------------------------------------------  /\\\  |

---

From: Paul Koning <[email-masked]>
Date: Wed, 26 Apr 2000 14:49:47 -0400 (EDT)

>>>>> "Russell" == Russell King <- ARM Linux Admin <[email-masked]>> writes:

 Russell> Philip Blundell writes:
 >> If you haven't done `swapon' then no swapping will actually happen
 >> (though kswapd will still exist).  A kernel panic inside kswapd is
 >> indicative of some deeper problem; if you post the details maybe
 >> someone can work out what's going on.

 Russell> Not quite true - it depends on whether you define "swapping"
 Russell> to mean "removing pages from memory and placing then in a
 Russell> file" or if you mean just "removing unused pages from
 Russell> memory".  The latter would be a better definition of
 Russell> kswapd's job, which it is able to perform without any swap
 Russell> file or swap partition.

Interesting... I didn't realize that.  The first definition you
mentioned is certainly the standard one, going back 30-40 years...

	  paul

---

From: Russell King - ARM Linux Admin <[email-masked]>
Date: Wed, 26 Apr 2000 19:49:55 +0100 (BST)

> mentioned is certainly the standard one, going back 30-40 years...

Yes, it is the accepted one.  However, in Linux, the paging systems
which fall under "kswapd"s control include the removal of clean pages
from each process.  Therefore, the term "swapping" under Linux seems
to fit the second definition more closely than the first.

Think of the second as a more optimised swapping technique.
   _____

---

From: Philip Blundell <[email-masked]>
Date: Wed, 26 Apr 2000 20:11:46 +0100

>to fit the second definition more closely than the first.

Technically, of course, neither is really swapping in the traditional sense.  
Colloquially, in this day and age, I get the impression most people think of 
the case where dirty pages are flushed to disk as "swapping", and the 
scenario where clean pages are just chucked away and later reloaded as 
"paging".

p.

---

From: Nicolas Pitre <[email-masked]>
Date: Wed, 26 Apr 2000 16:05:37 -0400 (EDT)

> ramdisk is ok, maybe there is a hardware fault on your machine?

I noticed something similar with Brutus which uses 4 memory nodes.  It
stopped working correctly for me somewhere from 2.3.35 to 2.3.51.  I
didn't have time to look more closely to it yet.
If the system is Brutus, I would like to have a confirmation from someone
else that it actually works on 2.3.35 but not on 2.3.99.

I suspected my discontigous memory support for some times, but the LART
uses 2 memory nodes... and I didn't receive any complain up to now.

Nicolas

---

From: Russell King - ARM Linux Admin <[email-masked]>
Date: Wed, 26 Apr 2000 21:25:59 +0100 (BST)

> uses 2 memory nodes... and I didn't receive any complain up to now.

Something here is ringing a bell - something like discontiguous memory
support may be slightly broken in 2.3.99 kernels at the moment?

However, it doesn't feature on Alan Cox's 2.3.99 jobs list, so it's probably
a false bell ringing.

Erk, btw, I seem to have leaked an address I didn't want to - kill any
linux.theplanet.co.uk addresses please!
   _____
  |_____| ------------------------------------------------- ---+---+-
  |   |        Russell King       [email-masked]      --- ---
  | | | |            http://www.arm.linux.org.uk/            /  /  |
  | +-+-+                                                     --- -+-
  /   |               THE developer of ARM Linux              |+| /|\
 /  | | |                                                     ---  |
    +-+-+ -------------------------------------------------  /\\\  |