public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Artem Bityutskiy <dedekind1@gmail.com>
To: Joakim Tjernlund <joakim.tjernlund@transmode.se>
Cc: linux-mtd@lists.infradead.org
Subject: Re: [PATCH 1/2] jffs2: Move erasing from write_super to GC.
Date: Thu, 18 Feb 2010 14:22:44 +0200	[thread overview]
Message-ID: <1266495764.16891.37.camel@localhost> (raw)
In-Reply-To: <OF2CF0C293.92055005-ONC12576CE.0042F59D-C12576CE.00438990@transmode.se>

On Thu, 2010-02-18 at 13:17 +0100, Joakim Tjernlund wrote:
> Artem Bityutskiy <dedekind1@gmail.com> wrote on 2010/02/18 12:06:06:
> >
> > On Wed, 2010-02-17 at 09:16 +0100, Joakim Tjernlund wrote:
> > > diff --git a/fs/jffs2/erase.c b/fs/jffs2/erase.c
> > > index b47679b..1ca2559 100644
> > > --- a/fs/jffs2/erase.c
> > > +++ b/fs/jffs2/erase.c
> > > @@ -114,6 +114,11 @@ void jffs2_erase_pending_blocks(struct jffs2_sb_info
> > *c, int count)
> > >     while (!list_empty(&c->erase_complete_list) ||
> > >            !list_empty(&c->erase_pending_list)) {
> > >
> > > +      if (signal_pending(current)) {
> > > +         spin_unlock(&c->erase_completion_lock);
> > > +         mutex_unlock(&c->erase_free_sem);
> > > +         goto done;
> > > +      }
> >
> > Err, I thought you would remove signal checking from this function? It
> > really does not belong here.
> 
> Slight misunderstanding, it needs to be there otherwise my patches won't do any good.
> Removing signal from this function basically means that we should remove count
> and only erase one block per invocation. Basically the while !empty loop needs to move
> into the GC task instead. This is a somewhat bigger surgery but doable.

Right. You can move the signal check to the BGT, and do 1-3 erases at a
time by passing cnt = 1-3. I think it is cleaner.

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

  reply	other threads:[~2010-02-18 12:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-17  8:16 [PATCH 0/2] Move erasing to the GC thread Joakim Tjernlund
2010-02-17  8:16 ` [PATCH 1/2] jffs2: Move erasing from write_super to GC Joakim Tjernlund
2010-02-17  8:16   ` [PATCH 2/2] jffs2: Make jffs2_erase_pending_trigger() initiate GC Joakim Tjernlund
2010-02-18 11:06   ` [PATCH 1/2] jffs2: Move erasing from write_super to GC Artem Bityutskiy
2010-02-18 12:17     ` Joakim Tjernlund
2010-02-18 12:22       ` Artem Bityutskiy [this message]
2010-02-18 13:12         ` Joakim Tjernlund

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=1266495764.16891.37.camel@localhost \
    --to=dedekind1@gmail.com \
    --cc=joakim.tjernlund@transmode.se \
    --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