On Tue, Apr 09, 2013 at 03:20:25PM -0400, John Baldwin wrote:
J> > J> > Log:
J> > J> > Merge from projects/counters:
J> > J> >
J> > J> > Pad struct pcpu so that its size is denominator of PAGE_SIZE. This
J> > J> > is done to reduce memory waste in UMA_PCPU_ZONE zones.
J> > J> >
J> > J> > Sponsored by: Nginx, Inc.
J> > J> >
J> > J> > Modified: head/sys/sys/pcpu.h
J> > J> >
J> > J>
==============================================================================
J> > J> > --- head/sys/sys/pcpu.h Mon Apr 8 19:10:45 2013
(r249264)
J> > J> > +++ head/sys/sys/pcpu.h Mon Apr 8 19:19:10 2013
(r249265)
J> > J> > @@ -180,6 +180,14 @@ struct pcpu {
J> > J> > PCPU_MD_FIELDS;
J> > J> > } __aligned(CACHE_LINE_SIZE);
J> > J>
J> > J> Why not change this to be PAGE_SIZE rather than putting explicit
padding in
J> > J> all the pcpu fields? That would seem to be more maintainable.
J> >
J> > Because it can be smaller than PAGE_SIZE. Two times smaller, four times
smaller.
J>
J> Ugh, I didn't parse the "denominator" part correctly. I had read it as
J> "multiple". OTOH, it seems quite cheap even on a 32-bit platform to lose
J> 3k per core (assuming 4k page size and 1k pcpu).
There could be several UMA_ZONE_PCPU zones.
--
Totus tuus, Glebius.
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"