On Fri, Jun 07, 2013 at 12:34:58AM +0400, Glauber Costa wrote: > We currently use a compile-time constant to size the node array for the > list_lru structure. Due to this, we don't need to allocate any memory at > initialization time. But as a consequence, the structures that contain > embedded list_lru lists can become way too big (the superblock for > instance contains two of them). > > This patch aims at ameliorating this situation by dynamically allocating > the node arrays with the firmware provided nr_node_ids. > > Signed-off-by: Glauber Costa <glommer@xxxxxxxxxx> > Cc: Dave Chinner <dchinner@xxxxxxxxxx> > Cc: Mel Gorman <mgorman@xxxxxxx> Just a small bug: > index c3f8ea9..9c2b656 100644 > --- a/fs/xfs/xfs_buf.c > +++ b/fs/xfs/xfs_buf.c > @@ -1591,6 +1591,7 @@ xfs_free_buftarg( > struct xfs_mount *mp, > struct xfs_buftarg *btp) > { > + list_lru_destroy(&btp->bt_lru); > unregister_shrinker(&btp->bt_shrinker); Unregister the shrinker before destroying the list the shrinker walks. Same for all the other cases.... Cheers, Dave. -- Dave Chinner david@xxxxxxxxxxxxx -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html