From: Jan Kara <jack@suse.cz>
To: Namhyung Kim <namhyung@gmail.com>
Cc: Jan Kara <jack@suse.cz>,
Andrew Morton <akpm@linux-foundation.org>,
linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH UPDATED] jbd: Use printk_ratelimited() in journal_alloc_journal_head()
Date: Mon, 4 Oct 2010 12:31:45 +0200 [thread overview]
Message-ID: <20101004103145.GG3589@quack.suse.cz> (raw)
In-Reply-To: <1286187133-12475-1-git-send-email-namhyung@gmail.com>
On Mon 04-10-10 19:12:13, Namhyung Kim wrote:
> Use printk_ratelimited() instead of doing it manually.
Thanks. I've merged the patch into my tree.
Honza
>
> Signed-off-by: Namhyung Kim <namhyung@gmail.com>
> ---
> fs/jbd/journal.c | 9 +++------
> 1 files changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/fs/jbd/journal.c b/fs/jbd/journal.c
> index 6f20a75..f79767d 100644
> --- a/fs/jbd/journal.c
> +++ b/fs/jbd/journal.c
> @@ -1718,7 +1718,6 @@ static void journal_destroy_journal_head_cache(void)
> static struct journal_head *journal_alloc_journal_head(void)
> {
> struct journal_head *ret;
> - static unsigned long last_warning;
>
> #ifdef CONFIG_JBD_DEBUG
> atomic_inc(&nr_journal_heads);
> @@ -1726,11 +1725,9 @@ static struct journal_head *journal_alloc_journal_head(void)
> ret = kmem_cache_alloc(journal_head_cache, GFP_NOFS);
> if (ret == NULL) {
> jbd_debug(1, "out of memory for journal_head\n");
> - if (time_after(jiffies, last_warning + 5*HZ)) {
> - printk(KERN_NOTICE "ENOMEM in %s, retrying.\n",
> - __func__);
> - last_warning = jiffies;
> - }
> + printk_ratelimited(KERN_NOTICE "ENOMEM in %s, retrying.\n",
> + __func__);
> +
> while (ret == NULL) {
> yield();
> ret = kmem_cache_alloc(journal_head_cache, GFP_NOFS);
> --
> 1.7.0.4
>
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR
next prev parent reply other threads:[~2010-10-04 10:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-04 9:17 [PATCH] jbd: Use printk_ratelimit() in journal_alloc_journal_head() Namhyung Kim
2010-10-04 9:43 ` Jan Kara
2010-10-04 10:12 ` [PATCH UPDATED] jbd: Use printk_ratelimited() " Namhyung Kim
2010-10-04 10:31 ` Jan Kara [this message]
2010-10-04 11:37 ` Jan Kara
2010-10-04 12:20 ` Namhyung Kim
2010-10-04 12:20 ` Namhyung Kim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20101004103145.GG3589@quack.suse.cz \
--to=jack@suse.cz \
--cc=akpm@linux-foundation.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=namhyung@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.