[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20070628224519.1a3319c3.akpm@linux-foundation.org>
Date: Thu, 28 Jun 2007 22:45:19 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: David Miller <davem@...emloft.net>
Cc: clameter@....com, hugh@...itas.com, James.Bottomley@...eleye.com,
rmk+lkml@....linux.org.uk, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Containment measures for slab objects on scatter gather
lists
On Thu, 28 Jun 2007 22:37:34 -0700 (PDT) David Miller <davem@...emloft.net> wrote:
> From: Andrew Morton <akpm@...ux-foundation.org>
> Date: Thu, 28 Jun 2007 22:24:24 -0700
>
> > So what happens when two quite different threads of control are doing
> > IO against two hunks of kmalloced memory which happen to come from the same
> > page? Either some (kernel-wide) locking is needed, or that pageframe needs
> > to be treated as readonly?
>
> Or you put an atomic_t at the beginning or tail of every SLAB
> object. It's a space cost not a runtime cost for the common
> case which is:
>
> smp_rmb();
> if (atomic_read(&slab_obj->count) == 1)
> really_free_it();
> else if (atomic_dec_and_test(...))
>
> Note I don't like this variant either. :)
but, but... Christoph said 'The dma layer may then perform operations on
the "slab page'.
If those operations involve modifying that slab page's pageframe then what
stops concurrent dma'ers from stomping on each other's changes? As in:
why aren't we already buggy?
If those operations _don't_ involve modifying the pageframe (hopes this is
true) then we're read-only and things become much easier?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists