All of lore.kernel.org
 help / color / mirror / Atom feed
* Running kmemleak without sysfs support
@ 2011-01-20 10:41 Daniel Baluta
  2011-01-20 10:43 ` Daniel Baluta
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Daniel Baluta @ 2011-01-20 10:41 UTC (permalink / raw)
  To: kernelnewbies

Hello all,

Can I make any use of kmemcheck if I don't have sysfs
kernel support enabled?

thanks,
Daniel.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Running kmemleak without sysfs support
  2011-01-20 10:41 Running kmemleak without sysfs support Daniel Baluta
@ 2011-01-20 10:43 ` Daniel Baluta
  2011-01-20 10:52 ` Catalin Marinas
  2011-01-20 15:56 ` Greg KH
  2 siblings, 0 replies; 8+ messages in thread
From: Daniel Baluta @ 2011-01-20 10:43 UTC (permalink / raw)
  To: kernelnewbies

> Can I make any use of kmemcheck if I don't have sysfs
> kernel support enabled?

s/kmemcheck/kmemleak :D

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Running kmemleak without sysfs support
  2011-01-20 10:41 Running kmemleak without sysfs support Daniel Baluta
  2011-01-20 10:43 ` Daniel Baluta
@ 2011-01-20 10:52 ` Catalin Marinas
  2011-01-20 12:33   ` Daniel Baluta
  2011-01-20 15:56 ` Greg KH
  2 siblings, 1 reply; 8+ messages in thread
From: Catalin Marinas @ 2011-01-20 10:52 UTC (permalink / raw)
  To: kernelnewbies

On Thu, 2011-01-20 at 10:41 +0000, Daniel Baluta wrote:
> Can I make any use of kmemcheck if I don't have sysfs
> kernel support enabled?

Kmemleak can scan output the memory and report the number of leaked
objects but if you need to get additional information about the leaked
objects (like backtrace), you need debugfs enabled.

DEBUG_FS doesn't seem to be dependent on SYSFS but I never tried to
enable one without the other (you might be able to mount the DEBUG_FS
somewhere other than /sys/kernel/debug/).

-- 
Catalin

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Running kmemleak without sysfs support
  2011-01-20 10:52 ` Catalin Marinas
@ 2011-01-20 12:33   ` Daniel Baluta
  2011-01-20 12:45     ` Catalin Marinas
  0 siblings, 1 reply; 8+ messages in thread
From: Daniel Baluta @ 2011-01-20 12:33 UTC (permalink / raw)
  To: kernelnewbies

On Thu, Jan 20, 2011 at 12:52 PM, Catalin Marinas
<catalin.marinas@arm.com> wrote:
> On Thu, 2011-01-20 at 10:41 +0000, Daniel Baluta wrote:
>> Can I make any use of kmemcheck if I don't have sysfs
>> kernel support enabled?
>
> Kmemleak can scan output the memory and report the number of leaked
> objects but if you need to get additional information about the leaked
> objects (like backtrace), you need debugfs enabled.

How is this reporting done?  It will appear in dmesg output?

> DEBUG_FS doesn't seem to be dependent on SYSFS but I never tried to
> enable one without the other (you might be able to mount the DEBUG_FS
> somewhere other than /sys/kernel/debug/).

I see. I was using 2.6.32 where it seems that debugfs depended on sysfs.
Decoupling was done some time later [1].

thanks,
Daniel.

[1] http://kerneltrap.org/mailarchive/linux-kernel/2010/8/5/4603446

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Running kmemleak without sysfs support
  2011-01-20 12:33   ` Daniel Baluta
@ 2011-01-20 12:45     ` Catalin Marinas
  0 siblings, 0 replies; 8+ messages in thread
From: Catalin Marinas @ 2011-01-20 12:45 UTC (permalink / raw)
  To: kernelnewbies

On Thu, 2011-01-20 at 12:33 +0000, Daniel Baluta wrote:
> On Thu, Jan 20, 2011 at 12:52 PM, Catalin Marinas
> <catalin.marinas@arm.com> wrote:
> > On Thu, 2011-01-20 at 10:41 +0000, Daniel Baluta wrote:
> >> Can I make any use of kmemcheck if I don't have sysfs
> >> kernel support enabled?
> >
> > Kmemleak can scan output the memory and report the number of leaked
> > objects but if you need to get additional information about the leaked
> > objects (like backtrace), you need debugfs enabled.
> 
> How is this reporting done?  It will appear in dmesg output?

Yes.

> > DEBUG_FS doesn't seem to be dependent on SYSFS but I never tried to
> > enable one without the other (you might be able to mount the DEBUG_FS
> > somewhere other than /sys/kernel/debug/).
> 
> I see. I was using 2.6.32 where it seems that debugfs depended on sysfs.
> Decoupling was done some time later [1].

Ah, I missed that. I'll change DEBUG_KMEMLEAK to always select DEBUG_FS
(currently only if SYSFS).

Thanks / multumesc :).

-- 
Catalin

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Running kmemleak without sysfs support
  2011-01-20 10:41 Running kmemleak without sysfs support Daniel Baluta
  2011-01-20 10:43 ` Daniel Baluta
  2011-01-20 10:52 ` Catalin Marinas
@ 2011-01-20 15:56 ` Greg KH
  2011-01-21  9:26   ` Daniel Baluta
  2 siblings, 1 reply; 8+ messages in thread
From: Greg KH @ 2011-01-20 15:56 UTC (permalink / raw)
  To: kernelnewbies

On Thu, Jan 20, 2011 at 12:41:57PM +0200, Daniel Baluta wrote:
> Hello all,
> 
> Can I make any use of kmemcheck if I don't have sysfs
> kernel support enabled?

Why would you ever want to run a kernel without sysfs support?  If you
turn it off, you loose a _lot_ of functionality that you will need to
add back to your system in some other manner.

What, specifically, is wrong with sysfs that is solved by turning it
off?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Running kmemleak without sysfs support
  2011-01-20 15:56 ` Greg KH
@ 2011-01-21  9:26   ` Daniel Baluta
  2011-01-21 14:02     ` Greg KH
  0 siblings, 1 reply; 8+ messages in thread
From: Daniel Baluta @ 2011-01-21  9:26 UTC (permalink / raw)
  To: kernelnewbies

On Thu, Jan 20, 2011 at 5:56 PM, Greg KH <greg@kroah.com> wrote:
> On Thu, Jan 20, 2011 at 12:41:57PM +0200, Daniel Baluta wrote:
>> Hello all,
>>
>> Can I make any use of kmemcheck if I don't have sysfs
>> kernel support enabled?
>
> Why would you ever want to run a kernel without sysfs support? ?If you
> turn it off, you loose a _lot_ of functionality that you will need to
> add back to your system in some other manner.

I totally agree with you. But we've done it to save memory.

> What, specifically, is wrong with sysfs that is solved by turning it
> off?

There's nothing wrong with sysfs. In fact, I like it!

thanks,
Daniel.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Running kmemleak without sysfs support
  2011-01-21  9:26   ` Daniel Baluta
@ 2011-01-21 14:02     ` Greg KH
  0 siblings, 0 replies; 8+ messages in thread
From: Greg KH @ 2011-01-21 14:02 UTC (permalink / raw)
  To: kernelnewbies

On Fri, Jan 21, 2011 at 11:26:43AM +0200, Daniel Baluta wrote:
> On Thu, Jan 20, 2011 at 5:56 PM, Greg KH <greg@kroah.com> wrote:
> > On Thu, Jan 20, 2011 at 12:41:57PM +0200, Daniel Baluta wrote:
> >> Hello all,
> >>
> >> Can I make any use of kmemcheck if I don't have sysfs
> >> kernel support enabled?
> >
> > Why would you ever want to run a kernel without sysfs support? ?If you
> > turn it off, you loose a _lot_ of functionality that you will need to
> > add back to your system in some other manner.
> 
> I totally agree with you. But we've done it to save memory.

Does it really save memory?  If so, how much and what is your budget for
memory?

Are you worried about swapable or non-swapable memory usage?

> > What, specifically, is wrong with sysfs that is solved by turning it
> > off?
> 
> There's nothing wrong with sysfs. In fact, I like it!

Then you should turn it back on, it will save you a whole lot of grief
in the end :)

good luck,

greg k-h

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-01-21 14:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-20 10:41 Running kmemleak without sysfs support Daniel Baluta
2011-01-20 10:43 ` Daniel Baluta
2011-01-20 10:52 ` Catalin Marinas
2011-01-20 12:33   ` Daniel Baluta
2011-01-20 12:45     ` Catalin Marinas
2011-01-20 15:56 ` Greg KH
2011-01-21  9:26   ` Daniel Baluta
2011-01-21 14:02     ` Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.