lkml.org 
[lkml]   [2008]   [Dec]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 01/14] kmemleak: Add the base support
On Tue, 30 Dec 2008 08:38:07 +0100 Ingo Molnar <mingo@elte.hu> wrote:

> * Andrew Morton <akpm@linux-foundation.org> wrote:
>
> > > +/*
> > > + * Stop the automatic memory scanning thread. This function must be called
> > > + * with the kmemleak_mutex held.
> > > + */
> > > +void stop_scan_thread(void)
> > > +{
> > > + if (scan_thread) {
> > > + kthread_stop(scan_thread);
> > > + scan_thread = NULL;
> > > + }
> > > +}
> >
> > so... why do we need a kernel thread?
> >
> > We could have (for the sake of argument) a sys_kmemleak_scan() which
> > does a single scan then returns. Or something like that. That way,
> > userspace directly gets to set the scanning frequency, thread priority,
> > etc.
>
> thread priority of a kernel thread can be set anyway. Kernel threads tend
> to be better for such simple things because we can control all aspects,
> start them automatically so that test setups catch it (without needing any
> userspace component), etc.
>

yeah yeah, userspace is too hard for kernel programmers, so we put our
applications, English-only pretty-printers etc into the kernel. It's a
broken record.


\
 
 \ /
  Last update: 2008-12-30 08:49    [W:0.078 / U:3.548 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site