[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140114180204.GD27791@kroah.com>
Date: Tue, 14 Jan 2014 10:02:04 -0800
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>
Cc: Yann Droneaud <ydroneaud@...eya.com>, linux-kernel@...r.kernel.org,
kernel@...gutronix.de, Dmitry Torokhov <dmitry.torokhov@...il.com>
Subject: Re: [PATCHv2] driver core/platform: don't leak memory allocated for
dma_mask
On Tue, Jan 14, 2014 at 11:36:48AM +0100, Uwe Kleine-König wrote:
> > I will try to get some figure on the number of platform_device
> > registered with a dmamask versus without a dmamask: adding the u64 to
> > all platform_object might cost more memory than the extra code (1 branch
> > and a function).
> Also take into account
>
> sizeof(struct platform_object) + strlen(average device)
>
> Before and after the change. ISTR that the first summand is ~300 (on
> ARM). With putting dma_mask unconditionally into platform_object this
> goes up by 8, IMHO that is OK.
>
> In return you save that alignment hassle and both your patch and the
> resulting code become simpler.
Yes, please do it this way, it makes it more obvious as to exactly what
is going on, which is more valuable than trying to be "tricky" and save
a few bytes of ram or rom.
thanks,
greg k-h
--
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