From 4b23690411cead5a1baa69aa2fa7e174ca65f815 Mon Sep 17 00:00:00 2001 From: nikita Date: Sat, 18 Oct 2008 17:39:45 +0000 Subject: [PATCH] Ratelimit a memory allocation failure message that can be too chatty. b=16450 --- libcfs/libcfs/tracefile.c | 3 ++- lustre/ChangeLog | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/libcfs/libcfs/tracefile.c b/libcfs/libcfs/tracefile.c index 5b9543e..de9c8e9 100644 --- a/libcfs/libcfs/tracefile.c +++ b/libcfs/libcfs/tracefile.c @@ -150,8 +150,9 @@ static struct trace_page *trace_get_tage_try(struct trace_cpu_data *tcd, } else { tage = tage_alloc(CFS_ALLOC_ATOMIC); if (tage == NULL) { + if (printk_ratelimit()) printk(KERN_WARNING - "failure to allocate a tage (%ld)\n", + "cannot allocate a tage (%ld)\n", tcd->tcd_cur_pages); return NULL; } diff --git a/lustre/ChangeLog b/lustre/ChangeLog index c6b98a7..39ad54d 100644 --- a/lustre/ChangeLog +++ b/lustre/ChangeLog @@ -1702,6 +1702,13 @@ Bugzilla : 16450 Description: Add sendfile.c test program. Details : New testing program exercising sendfile(2) (Jay). +Severity : minor +Bugzilla : 16450 +Description: Ratelimit a message that can be very frequent. +Details : Ratelimit a memory allocation failure message that can + be too chatty. + + -------------------------------------------------------------------------------- 2007-08-10 Cluster File Systems, Inc. -- 1.8.3.1