From: Jamie Lokier <jamie@shareable.org>
To: Brijesh Singh <brijesh.s.singh@gmail.com>
Cc: linux-mtd@lists.infradead.org
Subject: Re: UBI : Atomic change LEB
Date: Thu, 13 Sep 2007 15:38:19 +0100 [thread overview]
Message-ID: <20070913143819.GE22250@mail.shareable.org> (raw)
In-Reply-To: <6b5362aa0709130602g61e9b6f0xa762be770e95a32b@mail.gmail.com>
Brijesh Singh wrote:
> Thank you Artem.
> This seems like a good idea.This will certainly work
> .
> The only problem I see is
> * this will serialize all the automic changes.If some device supports
> multiple writes in parrallel,we are locking it for no reason(We have
> reason but hope we can find another option).Also we won't need
> serialization when there are lots of spare blocks.
>
> I can't see a better way right now.May be we should think over any
> possible twik to solve it.
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.
-- Jamie
next prev parent reply other threads:[~2007-09-13 14:38 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 [this message]
2007-09-13 15:46 ` Artem Bityutskiy
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=20070913143819.GE22250@mail.shareable.org \
--to=jamie@shareable.org \
--cc=brijesh.s.singh@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox