[Ocfs2-devel] [PATCH] Reoganize data elements to reduce memory footprint

Joel Becker Joel.Becker at oracle.com
Wed Jun 9 17:54:49 PDT 2010


On Wed, Jun 09, 2010 at 05:45:10PM -0700, Joel Becker wrote:
> > diff --git a/fs/ocfs2/ocfs2.h b/fs/ocfs2/ocfs2.h
> > index c67003b..34b9c79 100644
> > --- a/fs/ocfs2/ocfs2.h
> > +++ b/fs/ocfs2/ocfs2.h
> > @@ -151,17 +151,16 @@ struct ocfs2_lock_res {
> >  	void                    *l_priv;
> >  	struct ocfs2_lock_res_ops *l_ops;
> >  	spinlock_t               l_lock;
> > +	enum ocfs2_lock_type     l_type;

	On the subject of extreme structure diets...  ocfs2_lock_res
uses ints for l_ro_holders and l_ex_holders.  Do we ever have more than
64K holders?  Can we squash those into u16s?  I note that our code
doesn't handle overflow at all, but 2^32 holders is significantly
larger.
	Goldwyn, did you test this with CONFIG_OCFS2_FS_STATS and
CONFIG_DEBUG_LOCK_ENABLED turned on or off?  I'd be interested in that
data too.

Joel

-- 

"But all my words come back to me
 In shades of mediocrity.
 Like emptiness in harmony
 I need someone to comfort me."

Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127



More information about the Ocfs2-devel mailing list