lkml.org 
[lkml]   [1996]   [Dec]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: Fwd: [patch / 2.1.10] Kswapd cosmetic bug

Hi,

On Mon, 2 Dec 1996, Erik Andersen wrote:

> I am wondering why this patch, dated 16 Nov, never made it into the kernel?
> It fixes a real ugly cosmetic bug that has been bothering me for some
> time now. This keeps the message from the initialization of kswapd from
> mangling the partition check message for people using _MODULES_. People
> not using modules do not have this problem. The following from my machine's
> boot-up messages demonstrates the problem:
>
> Partition check:
> -----> hda:Started kswapd v 1.4.2.2
> hda1 hda3 hda4 < hda5 >
> hdc: hdc1 hdc2

This happens on the first sleeping, as schedule() will start the kernel
thread which was launched prior to setup().

As drivers can sleep during initialization, perhaps it is better to launch
the threads a bit latter in init/main.c ?

Probably doesn't matter now, but this way the threads will be initialized
at the same point on each system, and aside from automatically fixing the
cosmetic message above, it may solve a real race one day.

Gadi

[I'm not familiar with SMP - perhaps even after smp_begin() ?]

--- linux/init/main.c~ Mon Dec 2 20:36:49 1996
+++ linux/init/main.c Mon Dec 2 20:36:50 1996
@@ -917,10 +917,6 @@
int real_root_mountflags;
#endif

- /* Launch bdflush from here, instead of the old syscall way. */
- kernel_thread(bdflush, NULL, 0);
- /* Start the background pageout daemon. */
- kernel_thread(kswapd, NULL, 0);

#ifdef CONFIG_BLK_DEV_INITRD
real_root_dev = ROOT_DEV;
@@ -929,6 +925,11 @@
else mount_initrd =0;
#endif
setup();
+
+ /* Launch bdflush from here, instead of the old syscall way. */
+ kernel_thread(bdflush, NULL, 0);
+ /* Start the background pageout daemon. */
+ kernel_thread(kswapd, NULL, 0);

#ifdef __SMP__
/*
\
 
 \ /
  Last update: 2005-03-22 13:38    [W:0.028 / U:0.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site