[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20060831094905.GA13400@miraclelinux.com>
Date: Thu, 31 Aug 2006 18:49:05 +0900
From: Akinobu Mita <mita@...aclelinux.com>
To: akpm@...l.org
Cc: linux-kernel@...r.kernel.org
Subject: [PATCH] rate limiting for the ldisc open faulure messages
This patch limits the messages when ldisc open faulures happen.
It happens under memory pressure.
Signed-off-by: Akinobu Mita <mita@...aclelinux.com>
drivers/char/tty_io.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
Index: work-shouldfail/drivers/char/tty_io.c
===================================================================
--- work-shouldfail.orig/drivers/char/tty_io.c
+++ work-shouldfail/drivers/char/tty_io.c
@@ -2072,8 +2072,9 @@ fail_no_mem:
/* call the tty release_mem routine to clean out this slot */
release_mem_out:
- printk(KERN_INFO "init_dev: ldisc open failed, "
- "clearing slot %d\n", idx);
+ if (printk_ratelimit())
+ printk(KERN_INFO "init_dev: ldisc open failed, "
+ "clearing slot %d\n", idx);
release_mem(tty, idx);
goto end_init;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists