public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Artem Bityutskiy <dedekind@infradead.org>
To: Jamie Lokier <jamie@shareable.org>
Cc: Brijesh Singh <brijesh.s.singh@gmail.com>, linux-mtd@lists.infradead.org
Subject: Re: UBI : Atomic change LEB
Date: Thu, 13 Sep 2007 18:46:30 +0300	[thread overview]
Message-ID: <1189698391.14370.130.camel@sauron> (raw)
In-Reply-To: <20070913143819.GE22250@mail.shareable.org>

On Thu, 2007-09-13 at 15:38 +0100, Jamie Lokier wrote:
> Could you use a read-write lock, instead of a mutex?
> 
> Lock for "read" (meaning shared) when writing to the MTD device.  Lock
> for "write" (meaning exclusive) when erasing.  Then all erases are
> serialised, and writes can go in parallel.
> 
> Would that solve the locking problems?
> 
> If a device can support multiple erases in parallel as well, then
> you'd want something more complicated.

Usual LEB read/write/erase _already_ have per-LEB RW locking which is
actually even too much. We are talking only about LEB atomic change
operation, which is special.

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

      reply	other threads:[~2007-09-13 15:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-13  8:02 UBI : Atomic change LEB Brijesh Singh
2007-09-13 11:13 ` Artem Bityutskiy
2007-09-13 13:02   ` Brijesh Singh
2007-09-13 13:16     ` Artem Bityutskiy
2007-09-13 14:38     ` Jamie Lokier
2007-09-13 15:46       ` 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=1189698391.14370.130.camel@sauron \
    --to=dedekind@infradead.org \
    --cc=brijesh.s.singh@gmail.com \
    --cc=jamie@shareable.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