Profiling memory usage

Richard Hughes hughsient at gmail.com
Thu Nov 30 13:53:38 PST 2006


On Wed, 2006-11-29 at 13:35 -0500, David Zeuthen wrote:
> On Wed, 2006-11-29 at 01:54 +0000, Richard Hughes wrote:
> > I've been playing with massif and HAL to try and get the memory usage
> > reduced for projects like the 770 which are limited in memory.
> > 
> > You can see some initial results are here:
> > http://people.freedesktop.org/~hughsient/temp/massif.pdf - notice the
> > massive 3Mb memory allocation of queue_events().
> 
> Yeah, that was a stopgap fix to avoid heavy memory fragmentation. The
> right fix is probably seeing if we can use udevtrigger to generate the
> events since that, essentially, is what we're doing with coldplug. But
> as we discussed on IRC last night that includes lots of interesting
> corner cases.

Yes, this is most sane. I'm in the middle of exams right now, so hacking
will have to wait until Sunday.

I've attached the differences from HAL coldplugging, and getting udev to
do it for us using udevsend. In particular, there are a few devices
missing, and a few with different names. Kay, is there any known reason
for this? David assured me the code paths were 99% the same for hal and
udev, but I'm wondering if this 1% causes the differences. :-)

I'm running udev-095-14 (FC6) but can try CVS/git if you think this
might be worth trying.

For now, ignore the bus traffic generated using udevsend, I think we can
just suppress it from the HAL side. With regard to waiting for coldplug
to finish, I guess we can just poll /sys/kernel/uevent_seqnum, but is
there a nicer way?

> > I've been using massif, with local HAL patches to make it work - I've
> > found you can't drop privs, else massif won't write it's output files.
> > 
> > I've attached the patch I've been using. The default of dropping privs
> > is the same as before. Comments? Okay to commit?
> 
> Sure, let's add this. It's a nice test to see if something fails because
> one is doing things in hald (that perhaps one should do in a helper
> instead) that requires privileges.
> 
> For the record, I think it's nicer to have --retain-privileges without
> any parameters and abbreviations. Good to commit with that change.
> Thanks.

Sure, agreed. I've pushed this with your changes. Thanks for the
review. 

What about the battery class patch (send a couple of weeks ago) - I know
you want Danny to give it the once over,but do you like the general idea
of using glib set property and the general style?

Thanks,

Richard.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: udevsend-diffs.txt
Type: text/x-patch
Size: 2497 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/hal/attachments/20061130/cee3cf86/udevsend-diffs.bin


More information about the hal mailing list