All of lore.kernel.org
 help / color / mirror / Atom feed
* RE: [PATCH 3/3] Replace slab.c with a very simpleallocator.
@ 2005-02-03  8:43 Ian Pratt
  2005-02-03 19:44 ` ultraptr
  0 siblings, 1 reply; 5+ messages in thread
From: Ian Pratt @ 2005-02-03  8:43 UTC (permalink / raw)
  To: Rusty Russell, Ian Pratt; +Cc: Xen Mailing List

> > I think we want to ensure that the object returned is always
> > aligned to start on a L1 cache line boundary. I don't care that
> > we burn some memory as we don't have lots of small allocs.
> 
> If I may suggest, I'd prefer to put this in the hands of the caller,
> with an explicit alignment arg.  This simply falls out with this
> type-safe versions using __alignof__, and should neatly document this
> requirement, for example.

Hmm. I think pretty much everything we allocate is substantially biger
than a cache line, so there really isn't a whole lot of advantage in
doing this. We'd certainly have to go around sprinkling
__cacheline_aligned in a few more of our structure definitions to avoid
false sharing. BTW, I notice we use "__attribute__ ((aligned (X)))" in a
number of places as well as __alignof__. I presume they're the same
thing?

Out of interest, how do you extract information about such attributes
about structure definitions in a macro? 

> > Please could you adjust your patch having resync'ed from usntable.
> 
> Hmm, I hope that the bk snapshot is close enough.

The snapshot from last night should be OK (Keir removed _xmalloc late
last night GMT, so make sure you have this).

Thanks,
Ian


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl

^ permalink raw reply	[flat|nested] 5+ messages in thread
* RE: [PATCH 3/3] Replace slab.c with a very simpleallocator.
@ 2005-02-03 22:22 Ian Pratt
  0 siblings, 0 replies; 5+ messages in thread
From: Ian Pratt @ 2005-02-03 22:22 UTC (permalink / raw)
  To: ultraptr; +Cc: Rusty Russell, Ian Pratt, Xen Mailing List

> I wonder what are reasons for this replacement. From outside 
> it looks like
> proven and fast slab allocator is being replaced with slow 
> and new one just for sake of size and beauty of source codes?

The other way of looking at this is we'd be reaplacing an allocator that
almost no-one understands with one that's simple and we can easily be
evolved as required. It's also rather easier to "verify" its
correctness. 

Since the only dynamic allocation Xen does is on domain creation, we
really don't need anything too clever.

I can see your point of view, but asthetics often turn out to be
important when it comes to maintenance.

Ian



-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-02-04  3:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-03  8:43 [PATCH 3/3] Replace slab.c with a very simpleallocator Ian Pratt
2005-02-03 19:44 ` ultraptr
2005-02-04  2:11   ` David Hopwood
2005-02-04  3:26   ` Rusty Russell
  -- strict thread matches above, loose matches on Subject: below --
2005-02-03 22:22 Ian Pratt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.