All of lore.kernel.org
 help / color / mirror / Atom feed
From: Artem Bityutskiy <dedekind1@gmail.com>
To: David Woodhouse <dwmw2@infradead.org>
Cc: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>,
	linux-mtd@lists.infradead.org
Subject: Re: [PATCH] [MTD] Adjust the NOR CFI flash timeouts to round better
Date: Mon, 15 Oct 2012 22:28:19 +0300	[thread overview]
Message-ID: <1350329299.1509.6.camel@kyv> (raw)
In-Reply-To: <1350317380.14124.26.camel@shinybook.infradead.org>

[-- Attachment #1: Type: text/plain, Size: 1171 bytes --]

On Mon, 2012-10-15 at 09:09 -0700, David Woodhouse wrote:
> On Mon, 2012-10-15 at 16:42 +0300, Artem Bityutskiy wrote:
> > On Fri, 2012-10-05 at 12:32 -0600, Jason Gunthorpe wrote:
> > > -	/* see comments in do_write_oneword() regarding uWriteTimeo. */
> > > -	unsigned long uWriteTimeout = ( HZ / 1000 ) + 1;
> > > +	/* see comments in do_write_oneword() regarding uWriteTimeo.
> > > +	   Note: write_buffer commands take longer so we use a higher
> > > +	   time. The AMD 29LV256M for instance has a datasheet max
> > > +	   of 1.2ms for page and 600us for byte */
> > > +	unsigned long uWriteTimeout = (HZ / 1500) + 2;
> > 
> > What does HZ / 1500 mean? HZ is amount of timer interrupts per second,
> > which may be 1/100, or 1/1000, or 1/300, depending on the system.
> 
> If HZ is the amount of timer interrupts per second, then HZ/1500 is the
> amount of timer interrupts in 1/1500 of a second, aka 666.7µs.¹

First of all, yes, my e-mail was not very clear, I guess I just wanted
to express that it is not very readable. Also, HZ / 1500 would be 0 for
HZ < 1500, since we are using integer arithmetic.

-- 
Best Regards,
Artem Bityutskiy

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  parent reply	other threads:[~2012-10-15 19:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-05 18:32 [PATCH] [MTD] Adjust the NOR CFI flash timeouts to round better Jason Gunthorpe
2012-10-15 13:42 ` Artem Bityutskiy
2012-10-15 16:09   ` David Woodhouse
2012-10-15 16:57     ` Jason Gunthorpe
2012-10-15 17:31       ` David Woodhouse
2012-10-15 17:49         ` Jason Gunthorpe
2012-10-15 18:32           ` David Woodhouse
2012-10-15 19:08             ` Jason Gunthorpe
2012-10-15 19:28     ` Artem Bityutskiy [this message]
2012-10-15 20:00       ` David Woodhouse

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=1350329299.1509.6.camel@kyv \
    --to=dedekind1@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=jgunthorpe@obsidianresearch.com \
    --cc=linux-mtd@lists.infradead.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.