1. 30 Apr, 2008 9 commits
    • Thomas Gleixner's avatar
      debugobjects: add documentation · 691cc54c
      Thomas Gleixner authored
      
      Add a DocBook for debugobjects.
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Acked-by: default avatarIngo Molnar <mingo@elte.hu>
      Cc: Greg KH <greg@kroah.com>
      Cc: Randy Dunlap <randy.dunlap@oracle.com>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      691cc54c
    • Thomas Gleixner's avatar
      infrastructure to debug (dynamic) objects · 3ac7fe5a
      Thomas Gleixner authored
      
      We can see an ever repeating problem pattern with objects of any kind in the
      kernel:
      
      1) freeing of active objects
      2) reinitialization of active objects
      
      Both problems can be hard to debug because the crash happens at a point where
      we have no chance to decode the root cause anymore.  One problem spot are
      kernel timers, where the detection of the problem often happens in interrupt
      context and usually causes the machine to panic.
      
      While working on a timer related bug report I had to hack specialized code
      into the timer subsystem to get a reasonable hint for the root cause.  This
      debug hack was fine for temporary use, but far from a mergeable solution due
      to the intrusiveness into the timer code.
      
      The code further lacked the ability to detect and report the root cause
      instantly and keep the system operational.
      
      Keeping the system operational is important to get hold of the debug
      information without special debugging aids like serial consoles and special
      knowledge of the bug reporter.
      
      The problems described above are not restricted to timers, but timers tend to
      expose it usually in a full system crash.  Other objects are less explosive,
      but the symptoms caused by such mistakes can be even harder to debug.
      
      Instead of creating specialized debugging code for the timer subsystem a
      generic infrastructure is created which allows developers to verify their code
      and provides an easy to enable debug facility for users in case of trouble.
      
      The debugobjects core code keeps track of operations on static and dynamic
      objects by inserting them into a hashed list and sanity checking them on
      object operations and provides additional checks whenever kernel memory is
      freed.
      
      The tracked object operations are:
      - initializing an object
      - adding an object to a subsystem list
      - deleting an object from a subsystem list
      
      Each operation is sanity checked before the operation is executed and the
      subsystem specific code can provide a fixup function which allows to prevent
      the damage of the operation.  When the sanity check triggers a warning message
      and a stack trace is printed.
      
      The list of operations can be extended if the need arises.  For now it's
      limited to the requirements of the first user (timers).
      
      The core code enqueues the objects into hash buckets.  The hash index is
      generated from the address of the object to simplify the lookup for the check
      on kfree/vfree.  Each bucket has it's own spinlock to avoid contention on a
      global lock.
      
      The debug code can be compiled in without being active.  The runtime overhead
      is minimal and could be optimized by asm alternatives.  A kernel command line
      option enables the debugging code.
      
      Thanks to Ingo Molnar for review, suggestions and cleanup patches.
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Cc: Greg KH <greg@kroah.com>
      Cc: Randy Dunlap <randy.dunlap@oracle.com>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      3ac7fe5a
    • Samuel Thibault's avatar
      Basic braille screen reader support · f7511d5f
      Samuel Thibault authored
      
      This adds a minimalistic braille screen reader support.  This is meant to
      be used by blind people e.g.  on boot failures or when / cannot be mounted
      etc and thus the userland screen readers can not work.
      
      [akpm@linux-foundation.org: fix exports]
      Signed-off-by: default avatarSamuel Thibault <samuel.thibault@ens-lyon.org>
      Cc: Jiri Kosina <jikos@jikos.cz>
      Cc: Dmitry Torokhov <dtor@mail.ru>
      Acked-by: default avatarAlan Cox <alan@redhat.com>
      Cc: Randy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      f7511d5f
    • Miklos Szeredi's avatar
      mm: document missing fields for /proc/meminfo · b88473f7
      Miklos Szeredi authored
      
      A few fields in /proc/meminfo were not documented.  Fix.
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@suse.cz>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      b88473f7
    • Miklos Szeredi's avatar
      mm: bdi: move statistics to debugfs · 76f1418b
      Miklos Szeredi authored
      
      Move BDI statistics to debugfs:
      
         /sys/kernel/debug/bdi/<bdi>/stats
      
      Use postcore_initcall() to initialize the sysfs class and debugfs,
      because debugfs is initialized in core_initcall().
      
      Update descriptions in ABI documentation.
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@suse.cz>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      76f1418b
    • Peter Zijlstra's avatar
      mm: bdi: allow setting a maximum for the bdi dirty limit · a42dde04
      Peter Zijlstra authored
      
      Add "max_ratio" to /sys/class/bdi.  This indicates the maximum percentage of
      the global dirty threshold allocated to this bdi.
      
      [mszeredi@suse.cz]
      
       - fix parsing in max_ratio_store().
       - export bdi_set_max_ratio() to modules
       - limit bdi_dirty with bdi->max_ratio
       - document new sysfs attribute
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@suse.cz>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      a42dde04
    • Peter Zijlstra's avatar
      mm: bdi: allow setting a minimum for the bdi dirty limit · 189d3c4a
      Peter Zijlstra authored
      
      Under normal circumstances each device is given a part of the total write-back
      cache that relates to its current avg writeout speed in relation to the other
      devices.
      
      min_ratio - allows one to assign a minimum portion of the write-back cache to
      a particular device.  This is useful in situations where you might want to
      provide a minimum QoS.  (One request for this feature came from flash based
      storage people who wanted to avoid writing out at all costs - they of course
      needed some pdflush hacks as well)
      
      max_ratio - allows one to assign a maximum portion of the dirty limit to a
      particular device.  This is useful in situations where you want to avoid one
      device taking all or most of the write-back cache.  Eg.  an NFS mount that is
      prone to get stuck, or a FUSE mount which you don't trust to play fair.
      
      Add "min_ratio" to /sys/class/bdi.  This indicates the minimum percentage of
      the global dirty threshold allocated to this bdi.
      
      [mszeredi@suse.cz]
      
       - fix parsing in min_ratio_store()
       - document new sysfs attribute
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@suse.cz>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      189d3c4a
    • Peter Zijlstra's avatar
      mm: bdi: export BDI attributes in sysfs · cf0ca9fe
      Peter Zijlstra authored
      
      Provide a place in sysfs (/sys/class/bdi) for the backing_dev_info object.
      This allows us to see and set the various BDI specific variables.
      
      In particular this properly exposes the read-ahead window for all relevant
      users and /sys/block/<block>/queue/read_ahead_kb should be deprecated.
      
      With patient help from Kay Sievers and Greg KH
      
      [mszeredi@suse.cz]
      
       - split off NFS and FUSE changes into separate patches
       - document new sysfs attributes under Documentation/ABI
       - do bdi_class_init as a core_initcall, otherwise the "default" BDI
         won't be initialized
       - remove bdi_init_fmt macro, it's not used very much
      
      [akpm@linux-foundation.org: fix ia64 warning]
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Acked-by: default avatarGreg KH <greg@kroah.com>
      Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@suse.cz>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      cf0ca9fe
    • Pavel Emelyanov's avatar
      Deprecate find_task_by_pid() · 5cd20455
      Pavel Emelyanov authored
      
      There are some places that are known to operate on tasks'
      global pids only:
      
      * the rest_init() call (called on boot)
      * the kgdb's getthread
      * the create_kthread() (since the kthread is run in init ns)
      
      So use the find_task_by_pid_ns(..., &init_pid_ns) there
      and schedule the find_task_by_pid for removal.
      
      [sukadev@us.ibm.com: Fix warning in kernel/pid.c]
      Signed-off-by: default avatarPavel Emelyanov <xemul@openvz.org>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Signed-off-by: default avatarSukadev Bhattiprolu <sukadev@us.ibm.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      5cd20455
  2. 29 Apr, 2008 29 commits
  3. 28 Apr, 2008 2 commits