From: Alexander Belyakov <alexander.belyakov@intel.com>
To: dedekind@infradead.org
Cc: "Korolev, Alexey" <alexey.korolev@intel.com>,
linux-mtd@lists.infradead.org, "Kutergin,
Timofey" <timofey.kutergin@intel.com>
Subject: Re: [PATCH/RFC] Linux MTD striping middle layer
Date: Thu, 23 Mar 2006 12:39:55 +0300 [thread overview]
Message-ID: <44226CEB.70200@intel.com> (raw)
In-Reply-To: <1143047296.29683.44.camel@sauron.oktetlabs.ru>
Artem B. Bityutskiy wrote:
> 15 files changed, 4144 insertions(+), 33 deletions(-), 2
> modifications(!)
>
> You definitely have to split your patch on several parts. Your patch has
> to only affect drivers/mtd/mtdstripe.c and include/linux/mtd/stripe.h.
> If you have to modify other subsystem, send the modification separately,
> motivate them and let the corresponding janitor to review them.
Yes I realize that patch is quite large and might be difficult to
understand. You are right here.
Striping core (including initialization calls) is contained by the
following files:
drivers/mtd/mtdstripe.c
include/linux/mtd/stripe.h
drivers/mtd/maps/mphysmap.c
drivers/mtd/Kconfig
drivers/mtd/Makefile
Applying only these files one will get interleaving functional. But will not get performance increase. I shall make some explanations on that in this message.
So in order to simplify process I suggest to forget about all changes except those 5 files mentioned above. Shall I post new reduced diff file, containing mtdstripe core only?
Now on performance issue. I shall provide an example.
Say we have 2 physically independent flash devices (striping layer has 2 worker threads) with interleaving size of 128 bytes. Write operation with 1024 bytes of data is issued. Interleaving algorithm splits data in 8 chunks and pushes them into worker thread queues. Fist chip queue get chunk 1, chunk 3, chunk 5 and chunk 7. Second chip queue get chunk 2, chunk 4, chunk 6 and chunk 8. At this point both worker threads have the same priority equal (in simple case) to priority of the caller thread. Write to flashes begins here.
Worker thread 1 puts chunk 1 to flash 1 buffer and get free time flushing data to flash. At that free time worker thread 2 should get control and write chunk 2 to flash 2. But it won't despite worker thread 1 invokes rescheduling. Since switching between two thread with equal priority has some uncertainty. And data chunks will be written in the following order:
chunk 1
chunk 3
chunk 5
chunk 7
chunk 2
chunk 4
chunk 6
chunk 8
instead of expected:
chunk 1 chunk 2
chunk 3 chunk 4
chunk 5 chunk 6
chunk 7 chunk 8
It is obvious that one will not get any performance increase in the first case.
That is not only striping problem, but also a problem of several instances of file system mounted on different flashes. These filesystems also will not work simultaneously.
So mtdstripe itself is not enough to get performance increase. Additional solution needed. And two of possible solutions presented in the original diff file.
Now as my worries explained I'd suggest to push these thread switching issues into the background and continue with mtdstripe core only.
My question is: shall I post new reduced (mtdstripe core only) patch here leaving all the rest for future discussion?
Thanks,
Alexander Belyakov
next prev parent reply other threads:[~2006-03-23 9:40 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-21 12:36 [PATCH/RFC] Linux MTD striping middle layer Belyakov, Alexander
2006-03-21 14:01 ` Vitaly Wool
2006-03-21 14:41 ` Alexander Belyakov
2006-03-21 15:11 ` Vitaly Wool
2006-03-22 9:36 ` Alexander Belyakov
2006-03-21 15:37 ` Jörn Engel
2006-03-21 16:37 ` Thomas Gleixner
2006-03-21 15:36 ` Nicolas Pitre
2006-03-21 15:09 ` Artem B. Bityutskiy
2006-03-21 18:11 ` Alexander Belyakov
2006-03-21 18:57 ` Artem B. Bityutskiy
2006-03-21 19:37 ` Nicolas Pitre
2006-03-21 20:24 ` Jörn Engel
2006-03-22 8:58 ` Artem B. Bityutskiy
2006-03-22 14:40 ` Alexander Belyakov
2006-03-22 14:47 ` Artem B. Bityutskiy
2006-03-22 15:10 ` Alexander Belyakov
2006-03-22 15:15 ` Artem B. Bityutskiy
2006-03-22 15:39 ` Alexander Belyakov
2006-03-22 15:45 ` Vitaly Wool
2006-03-22 16:23 ` Alexander Belyakov
2006-03-22 16:30 ` Artem B. Bityutskiy
2006-03-22 19:25 ` Vitaly Wool
2006-03-22 19:40 ` Nicolas Pitre
2006-03-23 10:10 ` Vitaly Wool
2006-03-22 15:51 ` Artem B. Bityutskiy
2006-03-22 9:39 ` Alexander Belyakov
2006-03-22 9:52 ` Artem B. Bityutskiy
2006-03-22 10:26 ` Alexander Belyakov
2006-03-22 10:51 ` Artem B. Bityutskiy
2006-03-22 13:35 ` Alexander Belyakov
2006-03-22 14:40 ` Artem B. Bityutskiy
2006-03-22 16:19 ` Artem B. Bityutskiy
2006-03-22 16:23 ` Artem B. Bityutskiy
2006-03-22 17:17 ` Nicolas Pitre
2006-03-22 17:28 ` Artem B. Bityutskiy
2006-03-22 17:50 ` Nicolas Pitre
2006-03-21 19:08 ` Artem B. Bityutskiy
2006-03-22 9:57 ` Alexander Belyakov
2006-03-22 10:23 ` Artem B. Bityutskiy
2006-03-22 17:08 ` Artem B. Bityutskiy
2006-03-22 17:23 ` Nicolas Pitre
2006-03-23 9:39 ` Alexander Belyakov [this message]
2006-03-23 14:23 ` Nicolas Pitre
2006-03-23 14:45 ` Alexander Belyakov
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=44226CEB.70200@intel.com \
--to=alexander.belyakov@intel.com \
--cc=alexey.korolev@intel.com \
--cc=dedekind@infradead.org \
--cc=linux-mtd@lists.infradead.org \
--cc=timofey.kutergin@intel.com \
/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