Matt Mackall <[EMAIL PROTECTED]> wrote:
>
> I'll queue this
> up for after the sort and ACL stuff gets merged.
Whew!
I don't know how long the ACL changes will take to get merged up - is up to
Trond and he had quite a lot of rather robust comments on the first
iteration.
-
To unsubscribe from th
On Tue, Mar 01, 2005 at 08:06:22PM +0100, Christophe Saout wrote:
> Am Sonntag, den 27.02.2005, 13:25 -0800 schrieb Matt Mackall:
>
> > Which kernel? There was an off-by-one for odd array sizes in the
> > original posted version that was quickly spotted:
> >
> > http://www.kernel.org/pub/linux/ke
Am Sonntag, den 27.02.2005, 13:25 -0800 schrieb Matt Mackall:
> Which kernel? There was an off-by-one for odd array sizes in the
> original posted version that was quickly spotted:
>
> http://www.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.11-rc4/2.6.11-rc4-mm1/broken-out/sort-fix.pat
On Sun, 2005-02-27 at 22:25, Matt Mackall wrote:
> On Sun, Feb 27, 2005 at 02:17:51PM +0100, Andreas Gruenbacher wrote:
> > Matt,
> >
> > On Monday 31 January 2005 08:34, Matt Mackall wrote:
> > > This patch adds a generic array sorting library routine. This is meant
> > > to replace qsort, which
On Sunday 27 February 2005 22:53, Andreas Gruenbacher wrote:
> Okay, I didn't notice the off-by-one fix. It's still broken though; see the
> attached user-space test.
Found it. I didn't have the off-by-one fix and the bug triggered; then the
test case had a useless comparison function:
int cmp(c
On Sunday 27 February 2005 22:25, Matt Mackall wrote:
> On Sun, Feb 27, 2005 at 02:17:51PM +0100, Andreas Gruenbacher wrote:
> > Matt,
> >
> > On Monday 31 January 2005 08:34, Matt Mackall wrote:
> > > This patch adds a generic array sorting library routine. This is meant
> > > to replace qsort, wh
On Sun, Feb 27, 2005 at 02:17:51PM +0100, Andreas Gruenbacher wrote:
> Matt,
>
> On Monday 31 January 2005 08:34, Matt Mackall wrote:
> > This patch adds a generic array sorting library routine. This is meant
> > to replace qsort, which has two problem areas for kernel use.
>
> the sort function
Matt,
On Monday 31 January 2005 08:34, Matt Mackall wrote:
> This patch adds a generic array sorting library routine. This is meant
> to replace qsort, which has two problem areas for kernel use.
the sort function is broken. When sorting the integer array {1, 2, 3, 4, 5},
I'm getting {2, 3, 4, 5
> "AG" == Andreas Gruenbacher <[EMAIL PROTECTED]> writes:
AG> On Wed, 2005-02-02 at 11:50, Herbert Xu wrote:
>> What if a/b aren't aligned?
AG> If people sort arrays that are unaligned even though the
AG> element size is a multiple of sizeof(long) (or sizeof(u32)
AG> as Matt proposes), they a
On Wed, 2005-02-02 at 11:50, Herbert Xu wrote:
> Andreas Gruenbacher <[EMAIL PROTECTED]> wrote:
> >
> > static inline void swap(void *a, void *b, int size)
> > {
> >if (size % sizeof(long)) {
> >char t;
> >do {
> >t = *(char *)a;
> >
Andreas Gruenbacher <[EMAIL PROTECTED]> wrote:
>
> static inline void swap(void *a, void *b, int size)
> {
>if (size % sizeof(long)) {
>char t;
>do {
>t = *(char *)a;
>*(char *)a++ = *(char *)b;
>
Andreas Gruenbacher <[EMAIL PROTECTED]> said:
[...]
> Yes, because a custom swap routine isn't very useful generally. It's
> over-engineered IMHO.
It shouldn't swap, but juggle elements around like so:
t --->+
^ |
| v
x <-- x <-- x <--
On Tue, 2005-02-01 at 19:11, linux-os wrote:
> This uses an GNU-ISM where you are doing pointer arithmetic
> on a pointer-to-void. NotGood(tm) [...]
That's perfectly fine inside the kernel.
-- Andreas.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a mes
On Tue, 1 Feb 2005, linux-os wrote:
On Tue, 1 Feb 2005, Andreas Gruenbacher wrote:
On Mon, 2005-01-31 at 18:30, Paulo Marques wrote:
Andreas Gruenbacher wrote:
[...]
static inline void swap(void *a, void *b, int size)
{
if (size % sizeof(long)) {
char t;
do {
On Tue, 1 Feb 2005, Andreas Gruenbacher wrote:
On Mon, 2005-01-31 at 18:30, Paulo Marques wrote:
Andreas Gruenbacher wrote:
[...]
static inline void swap(void *a, void *b, int size)
{
if (size % sizeof(long)) {
char t;
do {
t = *(char
On Mon, 2005-01-31 at 18:30, Paulo Marques wrote:
> Andreas Gruenbacher wrote:
> > [...]
> >
> > static inline void swap(void *a, void *b, int size)
> > {
> > if (size % sizeof(long)) {
> > char t;
> > do {
> > t = *(char *)a;
> >
On Mon, 2005-01-31 at 20:30, Matt Mackall wrote:
> On Mon, Jan 31, 2005 at 06:16:23PM +0100, Andreas Gruenbacher wrote:
> > Hello,
> >
> > On Mon, 2005-01-31 at 08:34, Matt Mackall wrote:
> > > This patch adds a generic array sorting library routine. This is meant
> > > to replace qsort, which has
Matt Mackall <[EMAIL PROTECTED]> said:
> This patch adds a generic array sorting library routine. This is meant
> to replace qsort, which has two problem areas for kernel use.
Another problem is the GPL license. It will certainly be wanted from
non-GPL (e.g., binary) modules. Please just EXPORT_SY
On Mon, Jan 31, 2005 at 06:16:23PM +0100, Andreas Gruenbacher wrote:
> Hello,
>
> On Mon, 2005-01-31 at 08:34, Matt Mackall wrote:
> > This patch adds a generic array sorting library routine. This is meant
> > to replace qsort, which has two problem areas for kernel use.
>
> looks reasonable.
>
Andreas Gruenbacher wrote:
[...]
static inline void swap(void *a, void *b, int size)
{
if (size % sizeof(long)) {
char t;
do {
t = *(char *)a;
*(char *)a++ = *(char *)b;
*(char *)b++ = t;
Hello,
On Mon, 2005-01-31 at 08:34, Matt Mackall wrote:
> This patch adds a generic array sorting library routine. This is meant
> to replace qsort, which has two problem areas for kernel use.
looks reasonable.
> Note that this function has an extra parameter for passing in an
> optimized swappi
On Mon, Jan 31, 2005 at 01:52:57PM +0200, Alexey Dobriyan wrote:
> On Mon, 31 Jan 2005 01:34:59 -0600, Matt Mackall wrote:
>
> > This patch adds a generic array sorting library routine. This is meant
> > to replace qsort, which has two problem areas for kernel use.
>
> > --- /dev/null
> > +++ mm2
On Mon, 31 Jan 2005 01:34:59 -0600, Matt Mackall wrote:
> This patch adds a generic array sorting library routine. This is meant
> to replace qsort, which has two problem areas for kernel use.
> --- /dev/null
> +++ mm2/include/linux/sort.h
> @@ -0,0 +1,8 @@
> +void sort(void *base, size_t num, s
This patch adds a generic array sorting library routine. This is meant
to replace qsort, which has two problem areas for kernel use.
The first issue is quadratic worst-case performance. While quicksort
worst-case datasets are rarely encountered in normal scenarios, it is
in fact quite easy to cons
24 matches
Mail list logo