* Devres
@ 2014-11-21 17:21 Raphael Philipe
2014-11-21 17:31 ` Devres Greg KH
0 siblings, 1 reply; 2+ messages in thread
From: Raphael Philipe @ 2014-11-21 17:21 UTC (permalink / raw)
To: kernelnewbies
I have a device driver that requests a lot o memory regions with ioremap
and request_mem_region.
Today I came across devres. I would like to known your oppinion regarding
it?
If you don't know it, take a look here.
http://haifux.org/lectures/323/haifux-devres.pdf
It seems like a garbage collector for Linux Kernel. Do you agree?
Regards,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20141121/52d900d9/attachment.html
^ permalink raw reply [flat|nested] 2+ messages in thread
* Devres
2014-11-21 17:21 Devres Raphael Philipe
@ 2014-11-21 17:31 ` Greg KH
0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2014-11-21 17:31 UTC (permalink / raw)
To: kernelnewbies
On Fri, Nov 21, 2014 at 03:21:57PM -0200, Raphael Philipe wrote:
> I have a device driver that requests a lot o memory regions with ioremap and
> request_mem_region.
>
> Today I came across devres. I would like to known your oppinion regarding it?
>
> If you don't know it, take a look here.?http://haifux.org/lectures/323/
> haifux-devres.pdf
>
> It seems like a garbage collector for Linux Kernel. Do you agree?
"garbage collector" in what sense?
In the sense of "all of the things your device allocates will be
properly freed when your device is freed", then yes, that is true,
devres is great for that.
But as a "general" garbage collector, no, that's not what it is for, it
is a very specific tool for device-specific usages.
And yes, it's very good, everyone should be using it in their drivers.
greg k-h
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-11-21 17:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-21 17:21 Devres Raphael Philipe
2014-11-21 17:31 ` Devres Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).