lkml.org 
[lkml]   [2010]   [Sep]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/3] MEMSTICK: add support for legacy memorysticks
> 
> 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?





--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2010-09-21 03:19    [W:0.141 / U:0.428 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site