public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Artem Bityutskiy <dedekind@infradead.org>
To: Nielsen David Marqvar <David.Nielsen@frequentis.com>
Cc: dwmw2@infradead.org, linux-mtd@lists.infradead.org
Subject: RE: [PATCH][JFFS2] Reschedule during scan of partly emptyeraseblock
Date: Thu, 29 May 2008 14:49:29 +0300	[thread overview]
Message-ID: <1212061769.31023.68.camel@sauron> (raw)
In-Reply-To: <B80D0E83691CB840ACE9714151F8638501571080@VIECLEX01.frequentis.frq>


On Thu, 2008-05-29 at 13:40 +0200, Nielsen David Marqvar wrote:
> On Thu, 2008-05-29 at 11:47 +0200, Artem Bityutskiy wrote:
> > > This patch adds rescheduling to the loop that scans an empty area of
> > > an eraseblock.
> > > + /* check for resched - searching an eraseblock may take several ms */
> > > + if ( (ofs & 0x7ff /* for each 2KiB */) == 0)
> > > + 	cond_resched();
> > > +
> > 
> > I would rather add cond_resched() to jffs2_fill_scan_buf()
> > unconditionally. Conditional cond_resched() really looks bad.
> 
> I don't see how adding cond_resched() to jffs2_fill_scan_buf() will
> remove the long delay imposed by the while() loop that scans an empty
> area of an eraseblock - the loop (placed just after the label
> "more_empty:") will scan from ofs until scan_end unless it finds a
> non-erased area.
> There's an outer while loop around this one and the outer loop 
> already contains a cond_resched(), so it's not a new thing that
> cond_resched() may be needed during the scan.

Ok, I see. 

-- 
Best regards,
Artem Bityutskiy (Битюцкий Артём)

      reply	other threads:[~2008-05-29 11:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-29  9:29 [PATCH][JFFS2] Reschedule during scan of partly empty eraseblock Nielsen David Marqvar
2008-05-29  9:46 ` Artem Bityutskiy
2008-05-29 11:40   ` [PATCH][JFFS2] Reschedule during scan of partly emptyeraseblock Nielsen David Marqvar
2008-05-29 11:49     ` Artem Bityutskiy [this message]

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=1212061769.31023.68.camel@sauron \
    --to=dedekind@infradead.org \
    --cc=David.Nielsen@frequentis.com \
    --cc=dwmw2@infradead.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox