From: Paul Mundt <lethal@linux-sh.org>
To: Andrew Morton <akpm@osdl.org>, Paul Jackson <pj@sgi.com>
Cc: James Bottomley <James.Bottomley@SteelEye.com>,
tony@atomide.com, linux-kernel@vger.kernel.org
Subject: [PATCH 0/3] bitmap: multiword allocations and region restructuring.
Date: Fri, 27 Jan 2006 16:04:57 +0200 [thread overview]
Message-ID: <20060127140457.GA29632@linux-sh.org> (raw)
This trivial patch set implements a number of patches to clean up and
restructure the bitmap region code, in addition to extending the
interface to support multiword spanning allocations.
The current implementation (before this patch set) is limited by only
being able to allocate pages <= BITS_PER_LONG, as noted by the
strategically positioned BUG_ON() at lib/bitmap.c:752:
/* We don't do regions of pages > BITS_PER_LONG. The
* algorithm would be a simple look for multiple zeros in the
* array, but there's no driver today that needs this. If you
* trip this BUG(), you get to code it... */
BUG_ON(pages > BITS_PER_LONG);
As I seem to have been the first person to trigger this, the result ends
up being the following patch set with the help of Paul Jackson.
The final patch in the series eliminates quite a bit of code duplication,
so the bitmap code size ends up being smaller than the current
implementation as an added bonus.
After these are applied, it should already be possible to do multiword
allocations with dma_alloc_coherent() out of ranges established by
dma_declare_coherent_memory() on x86 without having to change any of the code,
and the SH store queue API will follow up on this as the other user that needs
support for this.
---
include/linux/bitmap.h | 3
lib/bitmap.c | 371 ++++++++++++++++++++++++++++---------------------
2 files changed, 218 insertions(+), 156 deletions(-)
next reply other threads:[~2006-01-27 14:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-27 14:04 Paul Mundt [this message]
2006-01-27 14:05 ` [PATCH 1/3] bitmap: region cleanup Paul Mundt
2006-01-27 14:06 ` [PATCH 2/3] bitmap: region multiword spanning support Paul Mundt
2006-01-27 14:06 ` [PATCH 3/3] bitmap: region restructuring Paul Mundt
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=20060127140457.GA29632@linux-sh.org \
--to=lethal@linux-sh.org \
--cc=James.Bottomley@SteelEye.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pj@sgi.com \
--cc=tony@atomide.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