Subject: extent(9) feature.
To: None <>
From: Paul Kranenburg <>
List: tech-kern
Date: 09/01/1998 20:37:47
I propose to add an argument to extent_alloc_subregion() that allows
an arbitrary number to be specifed to which the start of the returned 
region should be aligned.

Like so:

    extent_alloc_subregion(ex, substart, subend, size, alignment, skew,
			   boundary, flags, result)


(A) the result is aligned to `skew' modulo `aligment', i.e.

	(result - skew) % alignment == 0

(B) `skew' is restricted to values smaller alignment:

	0 <= skew < alignment		(it follows: align==NOALIGN => skew==0)

(C) `size' + `skew' must not exceed the specified boundary:

	size + skew <= boundary		(applicable if boundary != NOBOUNDARY)

(D) obviously: if skew == 0 then there's no change to previous behaviour.

[In case you were wondering: I need this in some BUS DMA routines on
 NetBSD/sparc to set up mappings between kernel/user virtual addresses
 and DVMA addresses that are aligned with respect to the cache size
 so cache coherency iron can do its job ].