From: Alex Dubov <oakad@yahoo.com>
To: Maxim Levitsky <maximlevitsky@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/3] MEMSTICK: add support for legacy memorysticks
Date: Mon, 20 Sep 2010 18:16:03 -0700 (PDT) [thread overview]
Message-ID: <553730.24538.qm@web37605.mail.mud.yahoo.com> (raw)
In-Reply-To: <20100920120235.f7b93405.akpm@linux-foundation.org>
>
> None of that explains why we're putting
> non-memstick-specific
> scatterlist infrastructure into the memstick driver, rather
> than into
> the scatterlist code.
In memstick driver this particular approach is used to get the largest
possible chunk of data from the block layer (to minimise the number of
media block accesses, just like with any other flash device driver).
Considering that legacy memstick, in its current state is not part of the
MTD, it well may be that it is not very useful in a general case. I
actually had "iterator style" interface for this sort of thing implemented
(it was operating on bio lists and was intended to mask the
difference between flat buffer and bio list). If there's an interest in
such an interface, either Maxim or me can try and submit it.
> Probably the code you copied from was wrong. The IDR
> interface is
> really ugly. All "container class" code which needs
> to allocate memory
> at element-insertion time has this issue. You
> should've seen all the
> crap we had to do to make insertion of pagecache into
> radix-trees
> reliable :(
>
It is indeed wrong, but I myself copied it from elsewhere, so back in a
time it was probably the standard approach. However, do you have a quick
advice for a case, were idr_pre_get happens outside spin-locked section,
as opposed to mutex one?
next prev parent reply other threads:[~2010-09-21 1:16 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-30 10:48 [PATCH 0/3 RESEND] My work on MemoryStick system Maxim Levitsky
2010-08-30 10:48 ` [PATCH 1/3] memstick: few changes to core Maxim Levitsky
2010-08-30 10:48 ` [PATCH 2/3] MEMSTICK: add support for legacy memorysticks Maxim Levitsky
2010-09-17 23:17 ` Andrew Morton
2010-09-18 1:06 ` Maxim Levitsky
2010-09-20 19:02 ` Andrew Morton
2010-09-21 1:16 ` Alex Dubov [this message]
2010-09-21 1:25 ` Andrew Morton
2010-08-30 10:48 ` [PATCH 3/3] MEMSTICK: Add driver for Ricoh R5C592 Card reader Maxim Levitsky
2010-09-04 23:36 ` [PATCH 0/3 RESEND] My work on MemoryStick system Maxim Levitsky
2010-09-06 0:47 ` Alex Dubov
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=553730.24538.qm@web37605.mail.mud.yahoo.com \
--to=oakad@yahoo.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maximlevitsky@gmail.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
all inboxes | Powered by JetHome®