13 Jun, 2009

2 commits

  • This patch (as1241) renames a bunch of functions in the PM core.
    Rather than go through a boring list of name changes, suffice it to
    say that in the end we have a bunch of pairs of functions:

    device_resume_noirq dpm_resume_noirq
    device_resume dpm_resume
    device_complete dpm_complete
    device_suspend_noirq dpm_suspend_noirq
    device_suspend dpm_suspend
    device_prepare dpm_prepare

    in which device_X does the X operation on a single device and dpm_X
    invokes device_X for all devices in the dpm_list.

    In addition, the old dpm_power_up and device_resume_noirq have been
    combined into a single function (dpm_resume_noirq).

    Lastly, dpm_suspend_start and dpm_resume_end are the renamed versions
    of the former top-level device_suspend and device_resume routines.

    Signed-off-by: Alan Stern
    Acked-by: Magnus Damm
    Signed-off-by: Rafael J. Wysocki

    Alan Stern
     
  • Rename the functions performing "_noirq" dev_pm_ops
    operations from device_power_down() and device_power_up()
    to device_suspend_noirq() and device_resume_noirq().

    The new function names are chosen to show that the functions
    are responsible for calling the _noirq() versions to finalize
    the suspend/resume operation. The current function names do
    not perform power down/up anymore so the names may be misleading.

    Global function renames:
    - device_power_down() -> device_suspend_noirq()
    - device_power_up() -> device_resume_noirq()

    Static function renames:
    - suspend_device_noirq() -> __device_suspend_noirq()
    - resume_device_noirq() -> __device_resume_noirq()

    Signed-off-by: Magnus Damm
    Acked-by: Greg Kroah-Hartman
    Acked-by: Len Brown
    Signed-off-by: Rafael J. Wysocki

    Magnus Damm
     

25 May, 2009

1 commit

  • We shouldn't hold dpm_list_mtx while executing
    [disable|enable]_nonboot_cpus(), because theoretically this may lead
    to a deadlock as shown by the following example (provided by Johannes
    Berg):

    CPU 3 CPU 2 CPU 1
    suspend/hibernate
    something:
    rtnl_lock() device_pm_lock()
    -> mutex_lock(&dpm_list_mtx)

    mutex_lock(&dpm_list_mtx)

    linkwatch_work
    -> rtnl_lock()
    disable_nonboot_cpus()
    -> flush CPU 3 workqueue

    Fortunately, device drivers are supposed to stop any activities that
    might lead to the registration of new device objects way before
    disable_nonboot_cpus() is called, so it shouldn't be necessary to
    hold dpm_list_mtx over the entire late part of device suspend and
    early part of device resume.

    Thus, during the late suspend and the early resume of devices acquire
    dpm_list_mtx only when dpm_list is going to be traversed and release
    it right after that.

    This patch is reported to fix the regressions tracked as
    http://bugzilla.kernel.org/show_bug.cgi?id=13245.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Alan Stern
    Reported-by: Miles Lane
    Tested-by: Ming Lei

    Rafael J. Wysocki
     

03 Apr, 2009

2 commits

  • The vmcoreinfo_data[] array is not used outside of kernel/kexec.c, and
    can therefore become static. This patch adds the relevant keyword to the
    definition of the array.

    Noticed by sparse.

    Signed-off-by: Dmitri Vorobiev
    Cc: "Eric W. Biederman"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dmitri Vorobiev
     
  • It would be nice to be able to extract the dmesg log from a vmcore file
    without needing to keep the debug symbols for the running kernel handy all
    the time. We have a facility to do this in /proc/vmcore. This patch adds
    the log_buf and log_end symbols to the vmcoreinfo area so that tools (like
    makedumpfile) can easily extract the dmesg logs from a vmcore image.

    [akpm@linux-foundation.org: several fixes and cleanups]
    [akpm@linux-foundation.org: fix unused log_buf_kexec_setup()]
    [akpm@linux-foundation.org: build fix]
    Signed-off-by: Neil Horman
    Cc: Simon Horman
    Acked-by: Vivek Goyal
    Cc: Neil Horman
    Cc: Simon Horman
    Cc: Vivek Goyal
    Cc: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Neil Horman
     

31 Mar, 2009

2 commits

  • Change the ordering of the kexec jump code so that the nonboot CPUs
    are disabled after calling device drivers' "late suspend" methods.

    This change reflects the recent modifications of the power management
    code that is also used by kexec jump.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Ingo Molnar

    Rafael J. Wysocki
     
  • Use the functions introduced in by the previous patch,
    suspend_device_irqs(), resume_device_irqs() and check_wakeup_irqs(),
    to rework the handling of interrupts during suspend (hibernation) and
    resume. Namely, interrupts will only be disabled on the CPU right
    before suspending sysdevs, while device drivers will be prevented
    from receiving interrupts, with the help of the new helper function,
    before their "late" suspend callbacks run (and analogously during
    resume).

    In addition, since the device interrups are now disabled before the
    CPU has turned all interrupts off and the CPU will ACK the interrupts
    setting the IRQ_PENDING bit for them, check in sysdev_suspend() if
    any wake-up interrupts are pending and abort suspend if that's the
    case.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Ingo Molnar

    Rafael J. Wysocki
     

23 Feb, 2009

2 commits


10 Feb, 2009

1 commit

  • ELF core dump is used for both user land core dump and kernel crash
    dump. Depending on architecture, register might need to be accessed
    differently for userland and kernel. Allow architectures to define
    ELF_CORE_COPY_KERNEL_REGS() and use different operation for kernel
    register dump.

    Signed-off-by: Tejun Heo
    Signed-off-by: Ingo Molnar

    Tejun Heo
     

14 Jan, 2009

1 commit


01 Jan, 2009

1 commit


21 Oct, 2008

1 commit

  • This fixes

    kernel/kexec.c: In function 'crash_save_vmcoreinfo_init':
    kernel/kexec.c:1374: error: 'vmlist' undeclared (first use in this function)
    kernel/kexec.c:1374: error: (Each undeclared identifier is reported only once
    kernel/kexec.c:1374: error: for each function it appears in.)
    kernel/kexec.c:1410: error: invalid use of undefined type 'struct vm_struct'
    make[1]: *** [kernel/kexec.o] Error 1

    Signed-off-by: Tony Luck
    Signed-off-by: Linus Torvalds

    Luck, Tony
     

20 Oct, 2008

1 commit

  • Add the symbols 'vmlist' and offset 'vm_struct.addr' to the vmcoreinfo[1]
    data for i386 vmalloc translation.

    makedumpfile[2] needs VMALLOC_START value for distinguishing a vmalloc
    address or not, because it should choose suitable translation method. If
    applying this patch, makedumpfile will be able to take VMALLOC_START value
    from 'vmlist.addr'.

    vmcoreinfo[1]:
    The vmcoreinfo data has the minimum debugging information only for dump
    filtering. makedumpfile[2] uses it to distinguish unnecessary pages and
    creates a small dumpfile.

    makedumpfile[2]:
    dump filtering command
    https://sourceforge.net/projects/makedumpfile/

    Signed-off-by: Ken'ichi Ohmichi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ken'ichi Ohmichi
     

23 Sep, 2008

1 commit

  • A segmentation fault can occur in kimage_add_entry in kexec.c when loading
    a kernel image into memory. The fault occurs because a page is requested
    by calling kimage_alloc_page with gfp_mask GFP_KERNEL and the function may
    actually return a page with gfp_mask GFP_HIGHUSER. The high mem page is
    returned because it was swapped with the kernel page due to the kernel
    page being a page that will shortly be copied to.

    This patch ensures that kimage_alloc_page returns a page that was created
    with the correct gfp flags.

    I have verified the change and fixed the whitespace damage of the original
    patch. Jonathan did a great job of tracking this down after he hit the
    problem. -- Eric

    Signed-off-by: Jonathan Steel
    Signed-off-by: Eric W. Biederman
    Acked-by: Simon Horman
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jonathan Steel
     

15 Aug, 2008

7 commits

  • Functionally the same, but more conventional.

    Cc: Huang Ying
    Tested-by: Vivek Goyal
    Cc: "Eric W. Biederman"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • Ftrace depends on some processor state that we destroyed during kexec and
    restored by restore_processor_state(). So save_processor_state() and
    restore_processor_state() are moved into machine_kexec() and ftrace is
    restored after restore_processor_state().

    Signed-off-by: Huang Ying
    Cc: Pavel Machek
    Cc: "Rafael J. Wysocki"
    Cc: "Eric W. Biederman"
    Cc: Vivek Goyal
    Cc: Ingo Molnar
    Cc: Steven Rostedt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Huang Ying
     
  • Add device_pm_lock() and device_pm_unlock() in kernel_kexec() in sync with
    current hibernation implementation.

    Signed-off-by: Huang Ying
    Acked-by: Pavel Machek
    Cc: "Rafael J. Wysocki"
    Cc: "Eric W. Biederman"
    Cc: Vivek Goyal
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Huang Ying
     
  • Call kernel_restart_prepare() in kernel_kexec() instead of duplicating the
    code.

    Signed-off-by: Huang Ying
    Acked-by: Pavel Machek
    Acked-by: Vivek Goyal
    Cc: Pavel Machek
    Cc: "Rafael J. Wysocki"
    Cc: "Eric W. Biederman"
    Cc: Vivek Goyal
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Huang Ying
     
  • Rename KEXEC_CONTROL_CODE_SIZE to KEXEC_CONTROL_PAGE_SIZE, because control
    page is used for not only code on some platform. For example in kexec
    jump, it is used for data and stack too.

    [akpm@linux-foundation.org: unbreak powerpc and arm, finish conversion]
    Signed-off-by: Huang Ying
    Cc: Pavel Machek
    Cc: "Rafael J. Wysocki"
    Cc: "Eric W. Biederman"
    Cc: Vivek Goyal
    Cc: Ingo Molnar
    Cc: Russell King
    Cc: Benjamin Herrenschmidt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Huang Ying
     
  • Move if (kexec_image->preserve_context) { ... } into #ifdef
    CONFIG_KEXEC_JUMP to make code looks cleaner.

    Fix no longer correct comments of kernel_kexec().

    Signed-off-by: Huang Ying
    Acked-by: Vivek Goyal
    Cc: Pavel Machek
    Cc: "Rafael J. Wysocki"
    Cc: "Eric W. Biederman"
    Cc: Vivek Goyal
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Huang Ying
     
  • kernel/kexec.c: In function 'kernel_kexec':
    kernel/kexec.c:1506: warning: value computed is not used

    Signed-off-by: Huang Ying
    Cc: "Eric W. Biederman"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Huang Ying
     

27 Jul, 2008

3 commits

  • This patch implements devices state save/restore before after kexec.

    This patch together with features in kexec_jump patch can be used for
    following:

    - A simple hibernation implementation without ACPI support. You can kexec a
    hibernating kernel, save the memory image of original system and shutdown
    the system. When resuming, you restore the memory image of original system
    via ordinary kexec load then jump back.

    - Kernel/system debug through making system snapshot. You can make system
    snapshot, jump back, do some thing and make another system snapshot.

    - Cooperative multi-kernel/system. With kexec jump, you can switch between
    several kernels/systems quickly without boot process except the first time.
    This appears like swap a whole kernel/system out/in.

    - A general method to call program in physical mode (paging turning
    off). This can be used to invoke BIOS code under Linux.

    The following user-space tools can be used with kexec jump:

    - kexec-tools needs to be patched to support kexec jump. The patches
    and the precompiled kexec can be download from the following URL:
    source: http://khibernation.sourceforge.net/download/release_v10/kexec-tools/kexec-tools-src_git_kh10.tar.bz2
    patches: http://khibernation.sourceforge.net/download/release_v10/kexec-tools/kexec-tools-patches_git_kh10.tar.bz2
    binary: http://khibernation.sourceforge.net/download/release_v10/kexec-tools/kexec_git_kh10

    - makedumpfile with patches are used as memory image saving tool, it
    can exclude free pages from original kernel memory image file. The
    patches and the precompiled makedumpfile can be download from the
    following URL:
    source: http://khibernation.sourceforge.net/download/release_v10/makedumpfile/makedumpfile-src_cvs_kh10.tar.bz2
    patches: http://khibernation.sourceforge.net/download/release_v10/makedumpfile/makedumpfile-patches_cvs_kh10.tar.bz2
    binary: http://khibernation.sourceforge.net/download/release_v10/makedumpfile/makedumpfile_cvs_kh10

    - An initramfs image can be used as the root file system of kexeced
    kernel. An initramfs image built with "BuildRoot" can be downloaded
    from the following URL:
    initramfs image: http://khibernation.sourceforge.net/download/release_v10/initramfs/rootfs_cvs_kh10.gz
    All user space tools above are included in the initramfs image.

    Usage example of simple hibernation:

    1. Compile and install patched kernel with following options selected:

    CONFIG_X86_32=y
    CONFIG_RELOCATABLE=y
    CONFIG_KEXEC=y
    CONFIG_CRASH_DUMP=y
    CONFIG_PM=y
    CONFIG_HIBERNATION=y
    CONFIG_KEXEC_JUMP=y

    2. Build an initramfs image contains kexec-tool and makedumpfile, or
    download the pre-built initramfs image, called rootfs.gz in
    following text.

    3. Prepare a partition to save memory image of original kernel, called
    hibernating partition in following text.

    4. Boot kernel compiled in step 1 (kernel A).

    5. In the kernel A, load kernel compiled in step 1 (kernel B) with
    /sbin/kexec. The shell command line can be as follow:

    /sbin/kexec --load-preserve-context /boot/bzImage --mem-min=0x100000
    --mem-max=0xffffff --initrd=rootfs.gz

    6. Boot the kernel B with following shell command line:

    /sbin/kexec -e

    7. The kernel B will boot as normal kexec. In kernel B the memory
    image of kernel A can be saved into hibernating partition as
    follow:

    jump_back_entry=`cat /proc/cmdline | tr ' ' '\n' | grep kexec_jump_back_entry | cut -d '='`
    echo $jump_back_entry > kexec_jump_back_entry
    cp /proc/vmcore dump.elf

    Then you can shutdown the machine as normal.

    8. Boot kernel compiled in step 1 (kernel C). Use the rootfs.gz as
    root file system.

    9. In kernel C, load the memory image of kernel A as follow:

    /sbin/kexec -l --args-none --entry=`cat kexec_jump_back_entry` dump.elf

    10. Jump back to the kernel A as follow:

    /sbin/kexec -e

    Then, kernel A is resumed.

    Implementation point:

    To support jumping between two kernels, before jumping to (executing)
    the new kernel and jumping back to the original kernel, the devices
    are put into quiescent state, and the state of devices and CPU is
    saved. After jumping back from kexeced kernel and jumping to the new
    kernel, the state of devices and CPU are restored accordingly. The
    devices/CPU state save/restore code of software suspend is called to
    implement corresponding function.

    Known issues:

    - Because the segment number supported by sys_kexec_load is limited,
    hibernation image with many segments may not be load. This is
    planned to be eliminated by adding a new flag to sys_kexec_load to
    make a image can be loaded with multiple sys_kexec_load invoking.

    Now, only the i386 architecture is supported.

    Signed-off-by: Huang Ying
    Acked-by: Vivek Goyal
    Cc: "Eric W. Biederman"
    Cc: Pavel Machek
    Cc: Nigel Cunningham
    Cc: "Rafael J. Wysocki"
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Huang Ying
     
  • This patch provides an enhancement to kexec/kdump. It implements the
    following features:

    - Backup/restore memory used by the original kernel before/after
    kexec.

    - Save/restore CPU state before/after kexec.

    The features of this patch can be used as a general method to call program in
    physical mode (paging turning off). This can be used to call BIOS code under
    Linux.

    kexec-tools needs to be patched to support kexec jump. The patches and
    the precompiled kexec can be download from the following URL:

    source: http://khibernation.sourceforge.net/download/release_v10/kexec-tools/kexec-tools-src_git_kh10.tar.bz2
    patches: http://khibernation.sourceforge.net/download/release_v10/kexec-tools/kexec-tools-patches_git_kh10.tar.bz2
    binary: http://khibernation.sourceforge.net/download/release_v10/kexec-tools/kexec_git_kh10

    Usage example of calling some physical mode code and return:

    1. Compile and install patched kernel with following options selected:

    CONFIG_X86_32=y
    CONFIG_KEXEC=y
    CONFIG_PM=y
    CONFIG_KEXEC_JUMP=y

    2. Build patched kexec-tool or download the pre-built one.

    3. Build some physical mode executable named such as "phy_mode"

    4. Boot kernel compiled in step 1.

    5. Load physical mode executable with /sbin/kexec. The shell command
    line can be as follow:

    /sbin/kexec --load-preserve-context --args-none phy_mode

    6. Call physical mode executable with following shell command line:

    /sbin/kexec -e

    Implementation point:

    To support jumping without reserving memory. One shadow backup page (source
    page) is allocated for each page used by kexeced code image (destination
    page). When do kexec_load, the image of kexeced code is loaded into source
    pages, and before executing, the destination pages and the source pages are
    swapped, so the contents of destination pages are backupped. Before jumping
    to the kexeced code image and after jumping back to the original kernel, the
    destination pages and the source pages are swapped too.

    C ABI (calling convention) is used as communication protocol between
    kernel and called code.

    A flag named KEXEC_PRESERVE_CONTEXT for sys_kexec_load is added to
    indicate that the loaded kernel image is used for jumping back.

    Now, only the i386 architecture is supported.

    Signed-off-by: Huang Ying
    Acked-by: Vivek Goyal
    Cc: "Eric W. Biederman"
    Cc: Pavel Machek
    Cc: Nigel Cunningham
    Cc: "Rafael J. Wysocki"
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Huang Ying
     
  • Since kimage_terminate() always returns 0, make it void.

    Signed-off-by: WANG Cong
    Signed-off-by: "Eric W. Biederman"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    WANG Cong
     

01 May, 2008

1 commit

  • The extended crashkernel syntax is a little confusing in the way it handles
    ranges. eg:

    crashkernel=512M-2G:64M,2G-:128M

    Means if the machine has between 512M and 2G of memory the crash region should
    be 64M, and if the machine has 2G of memory the region should be 64M. Only if
    the machine has more than 2G memory will 128M be allocated.

    Although that semantic is correct, it is somewhat baffling. Instead I propose
    that the end of the range means the first address past the end of the range,
    ie: 512M up to but not including 2G.

    [bwalle@suse.de: clarify inclusive/exclusive in crashkernel commandline in documentation]
    Signed-off-by: Michael Ellerman
    Acked-by: Bernhard Walle
    Cc: "Eric W. Biederman"
    Cc: Simon Horman
    Signed-off-by: Bernhard Walle
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michael Ellerman
     

28 Apr, 2008

1 commit

  • Add some values of page flags to the vmcoreinfo data.

    The vmcoreinfo data has the minimum debugging information only for dump
    filtering. makedumpfile (dump filtering command) gets it to distinguish
    unnecessary pages, and makedumpfile creates a small dumpfile.

    An old makedumpfile (v1.2.4 or before) had assumed some values of page flags
    internally, and this implementation could not follow the change of these
    values. For example, Christoph Lameter is changing these values by the
    follwing patch: http://lkml.org/lkml/2008/2/29/463

    So a new makedumpfile (v1.2.5) came to need these values and I created this
    patch to let the kernel output them.

    Signed-off-by: Ken'ichi Ohmichi
    Cc: Christoph Lameter
    Cc: "Eric W. Biederman"
    Acked-by: Vivek Goyal
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ken'ichi Ohmichi
     

19 Apr, 2008

1 commit


08 Feb, 2008

2 commits

  • For readability, all the calls to vmcoreinfo_append_str() are changed to macros
    having a prefix "VMCOREINFO_".

    This discussion is the following:
    http://www.ussg.iu.edu/hypermail/linux/kernel/0709.3/0584.html

    Signed-off-by: Ken'ichi Ohmichi
    Acked-by: Simon Horman
    Cc: David Rientjes
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ken'ichi Ohmichi
     
  • This patchset is for the vmcoreinfo data.

    The vmcoreinfo data has the minimum debugging information only for dump
    filtering. makedumpfile (dump filtering command) gets it to distinguish
    unnecessary pages, and makedumpfile creates a small dumpfile.

    This patch:

    VMCOREINFO_SIZE() should be renamed VMCOREINFO_STRUCT_SIZE() since it's always
    returning the size of the struct with a given name. This change would allow
    VMCOREINFO_TYPEDEF_SIZE() to simply become VMCOREINFO_SIZE() since it need not
    be used exclusively for typedefs.

    This discussion is the following:
    http://www.ussg.iu.edu/hypermail/linux/kernel/0709.3/0582.html

    Signed-off-by: Ken'ichi Ohmichi
    Acked-by: David Rientjes
    Acked-by: Simon Horman
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ken'ichi Ohmichi
     

09 Jan, 2008

1 commit

  • This patch adds the array length of "free_area.free_list" to the vmcoreinfo
    data so that makedumpfile (dump filtering command) can exclude all free pages
    in linux-2.6.24.

    makedumpfile creates a small dumpfile by excluding unnecessary pages for the
    analysis. To distinguish unnecessary pages, makedumpfile gets the vmcoreinfo
    data which has the minimum debugging information only for dump filtering.

    In 2.6.24-rc1 or later, the free_area.free_list is an array which has one list
    for each migrate types instead of a single list. makedumpfile needs the array
    length of "free_area.free_list" and the vmcoreinfo data should contain it.

    Signed-off-by: Huang Ying
    Tested-by: Ken'ichi Ohmichi
    Acked-by: Simon Horman
    Cc: David Rientjes
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ken'ichi Ohmichi
     

20 Oct, 2007

2 commits

  • This patch adds a extended crashkernel syntax that makes the value of reserved
    system RAM dependent on the system RAM itself:

    crashkernel=:[,:,...][@offset]
    range=start-[end]

    For example:

    crashkernel=512M-2G:64M,2G-:128M

    The motivation comes from distributors that configure their crashkernel
    command line automatically with some configuration tool (YaST, you know ;)).
    Of course that tool knows the value of System RAM, but if the user removes
    RAM, then the system becomes unbootable or at least unusable and error
    handling is very difficult.

    This series implements this change for i386, x86_64, ia64, ppc64 and sh. That
    should be all platforms that support kdump in current mainline. I tested all
    platforms except sh due to the lack of a sh processor.

    This patch:

    This is the generic part of the patch. It adds a parse_crashkernel() function
    in kernel/kexec.c that is called by the architecture specific code that
    actually reserves the memory. That function takes the whole command line and
    looks itself for "crashkernel=" in it.

    If there are multiple occurrences, then the last one is taken. The advantage
    is that if you have a bootloader like lilo or elilo which allows you to append
    a command line parameter but not to remove one (like in GRUB), then you can
    add another crashkernel value for testing at the boot command line and this
    one overwrites the command line in the configuration then.

    Signed-off-by: Bernhard Walle
    Cc: Andi Kleen
    Cc: "Luck, Tony"
    Cc: Paul Mackerras
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mundt
    Cc: Vivek Goyal
    Cc: "Eric W. Biederman"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Bernhard Walle
     
  • is_init() is an ambiguous name for the pid==1 check. Split it into
    is_global_init() and is_container_init().

    A cgroup init has it's tsk->pid == 1.

    A global init also has it's tsk->pid == 1 and it's active pid namespace
    is the init_pid_ns. But rather than check the active pid namespace,
    compare the task structure with 'init_pid_ns.child_reaper', which is
    initialized during boot to the /sbin/init process and never changes.

    Changelog:

    2.6.22-rc4-mm2-pidns1:
    - Use 'init_pid_ns.child_reaper' to determine if a given task is the
    global init (/sbin/init) process. This would improve performance
    and remove dependence on the task_pid().

    2.6.21-mm2-pidns2:

    - [Sukadev Bhattiprolu] Changed is_container_init() calls in {powerpc,
    ppc,avr32}/traps.c for the _exception() call to is_global_init().
    This way, we kill only the cgroup if the cgroup's init has a
    bug rather than force a kernel panic.

    [akpm@linux-foundation.org: fix comment]
    [sukadev@us.ibm.com: Use is_global_init() in arch/m32r/mm/fault.c]
    [bunk@stusta.de: kernel/pid.c: remove unused exports]
    [sukadev@us.ibm.com: Fix capability.c to work with threaded init]
    Signed-off-by: Serge E. Hallyn
    Signed-off-by: Sukadev Bhattiprolu
    Acked-by: Pavel Emelianov
    Cc: Eric W. Biederman
    Cc: Cedric Le Goater
    Cc: Dave Hansen
    Cc: Herbert Poetzel
    Cc: Kirill Korotaev
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Serge E. Hallyn
     

19 Oct, 2007

1 commit

  • Get rid of sparse related warnings from places that use integer as NULL
    pointer.

    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Stephen Hemminger
    Cc: Andi Kleen
    Cc: Jeff Garzik
    Cc: Matt Mackall
    Cc: Ian Kent
    Cc: Arnd Bergmann
    Cc: Davide Libenzi
    Cc: Stephen Smalley
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stephen Hemminger
     

17 Oct, 2007

5 commits

  • Add a prefix "VMCOREINFO_" to the vmcoreinfo macros. Old vmcoreinfo macros
    were defined as generic names SYMBOL/SIZE/OFFSET /LENGTH/CONFIG, and it is
    impossible to grep for them. So these names should be changed. This
    discussion is the following:
    http://www.ussg.iu.edu/hypermail/linux/kernel/0709.1/0415.html

    Signed-off-by: Ken'ichi Ohmichi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ken'ichi Ohmichi
     
  • [2/3] Add nodemask_t's size and NR_FREE_PAGES's value to vmcoreinfo_data.
    The dump filetering command 'makedumpfile'(v1.1.6 or before) had assumed
    the above values, and it was not good from the reliability viewpoint.
    So makedumpfile v1.2.0 came to need these values and I created the patch
    to let the kernel output them.
    makedumpfile site:
    https://sourceforge.net/projects/makedumpfile/

    Signed-off-by: Ken'ichi Ohmichi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ken'ichi Ohmichi
     
  • [1/3] Cleanup the coding style according to Andrew's comments:
    http://lists.infradead.org/pipermail/kexec/2007-August/000522.html
    - vmcoreinfo_append_str() should have suitable __attribute__s so that
    the compiler can check its use.
    - vmcoreinfo_max_size should have size_t.
    - Use get_seconds() instead of xtime.tv_sec.
    - Use init_uts_ns.name.release instead of UTS_RELEASE.

    Signed-off-by: Ken'ichi Ohmichi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ken'ichi Ohmichi
     
  • This patch set frees the restriction that makedumpfile users should install a
    vmlinux file (including the debugging information) into each system.

    makedumpfile command is the dump filtering feature for kdump. It creates a
    small dumpfile by filtering unnecessary pages for the analysis. To
    distinguish unnecessary pages, it needs a vmlinux file including the debugging
    information. These days, the debugging package becomes a huge file, and it is
    hard to install it into each system.

    To solve the problem, kdump developers discussed it at lkml and kexec-ml. As
    the result, we reached the conclusion that necessary information for dump
    filtering (called "vmcoreinfo") should be embedded into the first kernel file
    and it should be accessed through /proc/vmcore during the second kernel.
    (http://www.uwsg.iu.edu/hypermail/linux/kernel/0707.0/1806.html)

    Dan Aloni created the patch set for the above implementation.
    (http://www.uwsg.iu.edu/hypermail/linux/kernel/0707.1/1053.html)

    And I updated it for multi architectures and memory models.
    (http://lists.infradead.org/pipermail/kexec/2007-August/000479.html)

    Signed-off-by: Dan Aloni
    Signed-off-by: Ken'ichi Ohmichi
    Signed-off-by: Bernhard Walle
    Signed-off-by: Daisuke Nishimura
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ken'ichi Ohmichi
     
  • This patch cleans up duplicate includes in
    kernel/

    Signed-off-by: Jesper Juhl
    Acked-by: Paul E. McKenney
    Reviewed-by: Satyam Sharma
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jesper Juhl
     

09 May, 2007

1 commit

  • Currently the size of the per-cpu region reserved to save crash notes is
    set by the per-architecture value MAX_NOTE_BYTES. Which in turn is
    currently set to 1024 on all supported architectures.

    While testing ia64 I recently discovered that this value is in fact too
    small. The particular setup I was using actually needs 1172 bytes. This
    lead to very tedious failure mode where the tail of one elf note would
    overwrite the head of another if they ended up being alocated sequentially
    by kmalloc, which was often the case.

    It seems to me that a far better approach is to caclculate the size that
    the area needs to be. This patch does just that.

    If a simpler stop-gap patch for ia64 to be squeezed into 2.6.21(.X) is
    needed then this should be as easy as making MAX_NOTE_BYTES larger in
    arch/asm-ia64/kexec.h. Perhaps 2048 would be a good choice. However, I
    think that the approach in this patch is a much more robust idea.

    Acked-by: Vivek Goyal
    Signed-off-by: Simon Horman
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Simon Horman