All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mm/pdflush.c - handle kernel_thread failure
@ 2004-01-21 18:32 Eugene Teo
  2004-01-21 18:36 ` Randy.Dunlap
  2004-01-21 18:47 ` Eugene Teo
  0 siblings, 2 replies; 3+ messages in thread
From: Eugene Teo @ 2004-01-21 18:32 UTC (permalink / raw)
  To: kernel-janitors

A similar patch is included in 2.6.1-kj1. I am resubmitting
this with a couple of amendments - store the return value to
pid_t type variable, and use C99 __func__ instead.

diff -Naur -X /home/amnesia/w/dontdiff 2.6.2-rc1-orig/mm/pdflush.c 2.6.2-rc1-fix/mm/pdflush.c
--- 2.6.2-rc1-orig/mm/pdflush.c	2004-01-22 02:19:29.000000000 +0800
+++ 2.6.2-rc1-fix/mm/pdflush.c	2004-01-22 02:24:26.000000000 +0800
@@ -207,7 +207,11 @@
 
 static void start_one_pdflush_thread(void)
 {
-	kernel_thread(pdflush, NULL, CLONE_KERNEL);
+	pid_t ret;
+
+	ret = kernel_thread(pdflush, NULL, CLONE_KERNEL);
+	if (ret < 0)
+		printk("%s: unable to start kernel thread\n", __func__);
 }
 
 static int __init pdflush_init(void)

-- 
Eugene TEO   <eugeneteo@eugeneteo.net>   <http://www.anomalistic.org/>
1024D/14A0DDE5 print D851 4574 E357 469C D308  A01E 7321 A38A 14A0 DDE5
main(i) { putchar(182623909 >> (i-1) * 5&31|!!(i<7)<<6) && main(++i); }



-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Kernel-janitor-discuss mailing list
Kernel-janitor-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kernel-janitor-discuss

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

* Re: [PATCH] mm/pdflush.c - handle kernel_thread failure
  2004-01-21 18:32 [PATCH] mm/pdflush.c - handle kernel_thread failure Eugene Teo
@ 2004-01-21 18:36 ` Randy.Dunlap
  2004-01-21 18:47 ` Eugene Teo
  1 sibling, 0 replies; 3+ messages in thread
From: Randy.Dunlap @ 2004-01-21 18:36 UTC (permalink / raw)
  To: kernel-janitors

On Thu, 22 Jan 2004 02:32:59 +0800 Eugene Teo <eugene.teo@eugeneteo.net> wrote:

| A similar patch is included in 2.6.1-kj1. I am resubmitting
| this with a couple of amendments - store the return value to
| pid_t type variable, and use C99 __func__ instead.
| 
| diff -Naur -X /home/amnesia/w/dontdiff 2.6.2-rc1-orig/mm/pdflush.c 2.6.2-rc1-fix/mm/pdflush.c
| --- 2.6.2-rc1-orig/mm/pdflush.c	2004-01-22 02:19:29.000000000 +0800
| +++ 2.6.2-rc1-fix/mm/pdflush.c	2004-01-22 02:24:26.000000000 +0800
| @@ -207,7 +207,11 @@
|  
|  static void start_one_pdflush_thread(void)
|  {
| -	kernel_thread(pdflush, NULL, CLONE_KERNEL);
| +	pid_t ret;
| +
| +	ret = kernel_thread(pdflush, NULL, CLONE_KERNEL);
| +	if (ret < 0)
| +		printk("%s: unable to start kernel thread\n", __func__);
|  }
|  
|  static int __init pdflush_init(void)

Nope.  As Andrew pointed out to me:
"Nope, if we fail to start a thread here we'll just try again later. 
There's no need to warn."

--
~Randy
kernel-janitors project:  http://janitor.kernelnewbies.org/


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Kernel-janitor-discuss mailing list
Kernel-janitor-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kernel-janitor-discuss

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

* Re: [PATCH] mm/pdflush.c - handle kernel_thread failure
  2004-01-21 18:32 [PATCH] mm/pdflush.c - handle kernel_thread failure Eugene Teo
  2004-01-21 18:36 ` Randy.Dunlap
@ 2004-01-21 18:47 ` Eugene Teo
  1 sibling, 0 replies; 3+ messages in thread
From: Eugene Teo @ 2004-01-21 18:47 UTC (permalink / raw)
  To: kernel-janitors

<quote sender="Randy.Dunlap">
> On Thu, 22 Jan 2004 02:32:59 +0800 Eugene Teo <eugene.teo@eugeneteo.net> wrote:
> 
> | A similar patch is included in 2.6.1-kj1. I am resubmitting
> | this with a couple of amendments - store the return value to
> | pid_t type variable, and use C99 __func__ instead.
> | 

[snip]

> Nope.  As Andrew pointed out to me:
> "Nope, if we fail to start a thread here we'll just try again later. 
> There's no need to warn."

All right. Make sense. 

Eugene

-- 
Eugene TEO   <eugeneteo@eugeneteo.net>   <http://www.anomalistic.org/>
1024D/14A0DDE5 print D851 4574 E357 469C D308  A01E 7321 A38A 14A0 DDE5
main(i) { putchar(182623909 >> (i-1) * 5&31|!!(i<7)<<6) && main(++i); }



-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Kernel-janitor-discuss mailing list
Kernel-janitor-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kernel-janitor-discuss

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

end of thread, other threads:[~2004-01-21 18:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-21 18:32 [PATCH] mm/pdflush.c - handle kernel_thread failure Eugene Teo
2004-01-21 18:36 ` Randy.Dunlap
2004-01-21 18:47 ` Eugene Teo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.