All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: Jeff Layton <jlayton@redhat.com>
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
	linux-fsdevel@vger.kernel.org, fengguang.wu@intel.com
Subject: Re: [PATCH] writeback: guard against jiffies wraparound on inode->dirtied_when checks (try #3)
Date: Wed, 01 Apr 2009 22:22:06 +0200	[thread overview]
Message-ID: <87y6ukktu9.fsf@basil.nowhere.org> (raw)
In-Reply-To: <1238607475-8203-1-git-send-email-jlayton@redhat.com> (Jeff Layton's message of "Wed,  1 Apr 2009 13:37:55 -0400")

Jeff Layton <jlayton@redhat.com> writes:
>
> The problem is that these checks assume that dirtied_when is updated
> periodically. If an inode is continuously being used for I/O it can be
> persistently marked as dirty and will continue to age. Once the time
> difference between dirtied_when and the jiffies value it is being
> compared to is greater than or equal to half the maximum of the jiffies
> type, the logic of the time_*() macros inverts and the opposite of what
> is needed is returned. On 32-bit architectures that's just under 25 days
> (assuming HZ == 1000).

I wonder if this can happen in other places using jiffies time stamp
too. Why not? Perhaps that check macro should be in timer.h and some auditing done
over the whiole code base?

-Andi


-- 
ak@linux.intel.com -- Speaking for myself only.

  reply	other threads:[~2009-04-01 20:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-01 17:37 [PATCH] writeback: guard against jiffies wraparound on inode->dirtied_when checks (try #3) Jeff Layton
2009-04-01 20:22 ` Andi Kleen [this message]
2009-04-01 21:26   ` Jeff Layton
2009-04-01 22:12     ` Andi Kleen
2009-04-02 11:58       ` Jeff Layton

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=87y6ukktu9.fsf@basil.nowhere.org \
    --to=andi@firstfloor.org \
    --cc=akpm@linux-foundation.org \
    --cc=fengguang.wu@intel.com \
    --cc=jlayton@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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.