1. 15 2月, 2007 4 次提交
  2. 13 2月, 2007 2 次提交
    • V
      [PATCH] generic: Break init() in two parts to avoid MODPOST warnings · ee5bfa64
      Vivek Goyal 提交于
      o init() is a non __init function in .text section but it calls many
        functions which are in .init.text section. Hence MODPOST generates lots
        of cross reference warnings on i386 if compiled with CONFIG_RELOCATABLE=y
      
      WARNING: vmlinux - Section mismatch: reference to .init.text:smp_prepare_cpus from .text between 'init' (at offset 0xc0101049) and 'rest_init'
      WARNING: vmlinux - Section mismatch: reference to .init.text:migration_init from .text between 'init' (at offset 0xc010104e) and 'rest_init'
      WARNING: vmlinux - Section mismatch: reference to .init.text:spawn_ksoftirqd from .text between 'init' (at offset 0xc0101053) and 'rest_init'
      
      o This patch breaks down init() in two parts. One part which can go
        in .init.text section and can be freed and other part which has to
        be non __init(init_post()). Now init() calls init_post() and init_post()
        does not call any functions present in .init sections. Hence getting
        rid of warnings.
      Signed-off-by: NVivek Goyal <vgoyal@in.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      ee5bfa64
    • A
      [PATCH] Dynamic kernel command-line: common · 30d7e0d4
      Alon Bar-Lev 提交于
      Current implementation stores a static command-line buffer allocated to
      COMMAND_LINE_SIZE size.  Most architectures stores two copies of this buffer,
      one for future reference and one for parameter parsing.
      
      Current kernel command-line size for most architecture is much too small for
      module parameters, video settings, initramfs paramters and much more.  The
      problem is that setting COMMAND_LINE_SIZE to a grater value, allocates static
      buffers.
      
      In order to allow a greater command-line size, these buffers should be
      dynamically allocated or marked as init disposable buffers, so unused memory
      can be released.
      
      This patch renames the static saved_command_line variable into
      boot_command_line adding __initdata attribute, so that it can be disposed
      after initialization.  This rename is required so applications that use
      saved_command_line will not be affected by this change.
      
      It reintroduces saved_command_line as dynamically allocated buffer to match
      the data in boot_command_line.
      
      It also mark secondary command-line buffer as __initdata, and copies it to
      dynamically allocated static_command_line buffer components may hold reference
      to it after initialization.
      
      This patch is for linux-2.6.20-rc4-mm1 and is divided to target each
      architecture.  I could not check this in any architecture so please forgive me
      if I got it wrong.
      
      The per-architecture modification is very simple, use boot_command_line in
      place of saved_command_line.  The common code is the change into dynamic
      command-line.
      
      This patch:
      
      1. Rename saved_command_line into boot_command_line, mark as init
         disposable.
      
      2. Add dynamic allocated saved_command_line.
      
      3. Add dynamic allocated static_command_line.
      
      4. During startup copy: boot_command_line into saved_command_line.  arch
         command_line into static_command_line.
      
      5. Parse static_command_line and not arch command_line, so arch
         command_line may be freed.
      Signed-off-by: NAlon Bar-Lev <alon.barlev@gmail.com>
      Cc: Andi Kleen <ak@muc.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Cc: Ian Molton <spyro@f2s.com>
      Cc: Mikael Starvik <starvik@axis.com>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Kyle McMartin <kyle@mcmartin.ca>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Hirokazu Takata <takata@linux-m32r.org>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
      Cc: Richard Curnow <rc@rc0.org.uk>
      Cc: William Lee Irwin III <wli@holomorphy.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Cc: Miles Bader <uclinux-v850@lsi.nec.co.jp>
      Cc: Chris Zankel <chris@zankel.net>
      Cc: "Luck, Tony" <tony.luck@intel.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Cc: Greg Ungerer <gerg@uclinux.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      30d7e0d4
  3. 12 2月, 2007 4 次提交
  4. 12 1月, 2007 1 次提交
    • L
      Don't put "linux_banner" in the .init section · c71551ad
      Linus Torvalds 提交于
      It might save a few bytes after bootup, but it causes the string to be
      linked in at the end of the final vmlinux image, which defeats the whole
      point of doing all this, namely allowing some broken user-space binaries
      to search for the kernel version string in the kernel binary.
      
      So just remove the __init specifier.
      
      Cc: Olaf Hering <olaf@aepfle.de>
      Cc: Jean Delvare <khali@linux-fr.org>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Cc: Andrey Borzenkov <arvidjaar@mail.ru>
      Cc: Andrew Morton <akpm@osdl.org>
      Acked-by: NAndy Whitcroft <apw@shadowen.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      c71551ad
  5. 11 1月, 2007 2 次提交
  6. 06 1月, 2007 1 次提交
  7. 23 12月, 2006 3 次提交
  8. 21 12月, 2006 1 次提交
  9. 13 12月, 2006 1 次提交
  10. 12 12月, 2006 2 次提交
    • L
      Make sure we populate the initroot filesystem late enough · 8d610dd5
      Linus Torvalds 提交于
      We should not initialize rootfs before all the core initializers have
      run.  So do it as a separate stage just before starting the regular
      driver initializers.
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      8d610dd5
    • L
      Make SLES9 "get_kernel_version" work on the kernel binary again · 8993780a
      Linus Torvalds 提交于
      As reported by Andy Whitcroft, at least the SLES9 initrd build process
      depends on getting the kernel version from the kernel binary.  It does
      that by simply trawling the binary and looking for the signature of the
      "linux_banner" string (the string "Linux version " to be exact. Which
      is really broken in itself, but whatever..)
      
      That got broken when the string was changed to allow /proc/version to
      change the UTS release information dynamically, and "get_kernel_version"
      thus returned "%s" (see commit a2ee8649:
      "[PATCH] Fix linux banner utsname information").
      
      This just restores "linux_banner" as a static string, which should fix
      the version finding.  And /proc/version simply uses a different string.
      
      To avoid wasting even that miniscule amount of memory, the early boot
      string should really be marked __initdata, but that just causes the same
      bug in SLES9 to re-appear, since it will then find other occurrences of
      "Linux version " first.
      
      Cc: Andy Whitcroft <apw@shadowen.org>
      Acked-by: NHerbert Poetzl <herbert@13thfloor.at>
      Cc: Andi Kleen <ak@suse.de>
      Cc: Andrew Morton <akpm@osdl.org>
      Cc: Steve Fox <drfickle@us.ibm.com>
      Acked-by: NOlaf Hering <olaf@aepfle.de>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      8993780a
  11. 11 12月, 2006 1 次提交
    • A
      [PATCH] io-accounting: core statistics · 7c3ab738
      Andrew Morton 提交于
      The present per-task IO accounting isn't very useful.  It simply counts the
      number of bytes passed into read() and write().  So if a process reads 1MB
      from an already-cached file, it is accused of having performed 1MB of I/O,
      which is wrong.
      
      (David Wright had some comments on the applicability of the present logical IO accounting:
      
        For billing purposes it is useless but for workload analysis it is very
        useful
      
        read_bytes/read_calls  average read request size
        write_bytes/write_calls average write request size
      
        read_bytes/read_blocks ie logical/physical can indicate hit rate or thrashing
        write_bytes/write_blocks  ie logical/physical  guess since pdflush writes can
                                                      be missed
      
        I often look for logical larger than physical to see filesystem cache
        problems.  And the bytes/cpusec can help find applications that are
        dominating the cache and causing slow interactive response from page cache
        contention.
      
        I want to find the IO intensive applications and make sure they are doing
        efficient IO.  Thus the acctcms(sysV) or csacms command would give the high
        IO commands).
      
      This patchset adds new accounting which tries to be more accurate.  We account
      for three things:
      
      reads:
      
        attempt to count the number of bytes which this process really did cause
        to be fetched from the storage layer.  Done at the submit_bio() level, so it
        is accurate for block-backed filesystems.  I also attempt to wire up NFS and
        CIFS.
      
      writes:
      
        attempt to count the number of bytes which this process caused to be sent
        to the storage layer.  This is done at page-dirtying time.
      
        The big inaccuracy here is truncate.  If a process writes 1MB to a file
        and then deletes the file, it will in fact perform no writeout.  But it will
        have been accounted as having caused 1MB of write.
      
        So...
      
      cancelled_writes:
      
        account the number of bytes which this process caused to not happen, by
        truncating pagecache.
      
        We _could_ just subtract this from the process's `write' accounting.  But
        that means that some processes would be reported to have done negative
        amounts of write IO, which is silly.
      
        So we just report the raw number and punt this decision up to userspace.
      
      Now, we _could_ account for writes at the physical I/O level.  But
      
      - This would require that we track memory-dirtying tasks at the per-page
        level (would require a new pointer in struct page).
      
      - It would mean that IO statistics for a process are usually only available
        long after that process has exitted.  Which means that we probably cannot
        communicate this info via taskstats.
      
      This patch:
      
      Wire up the kernel-private data structures and the accessor functions to
      manipulate them.
      
      Cc: Jay Lan <jlan@sgi.com>
      Cc: Shailabh Nagar <nagar@watson.ibm.com>
      Cc: Balbir Singh <balbir@in.ibm.com>
      Cc: Chris Sturtivant <csturtiv@sgi.com>
      Cc: Tony Ernst <tee@sgi.com>
      Cc: Guillaume Thouvenin <guillaume.thouvenin@bull.net>
      Cc: David Wright <daw@sgi.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      7c3ab738
  12. 09 12月, 2006 2 次提交
  13. 08 12月, 2006 3 次提交
  14. 07 12月, 2006 1 次提交
  15. 02 12月, 2006 1 次提交
  16. 09 11月, 2006 1 次提交
    • E
      [PATCH] sysctl: Undeprecate sys_sysctl · 13bb7e37
      Eric W. Biederman 提交于
      The basic issue is that despite have been deprecated and warned about as a
      very bad thing in the man pages since its inception there are a few real
      users of sys_sysctl.  It was my assumption that because sysctl had been
      deprecated for all of 2.6 there would be no user space users by this point,
      so I initially gave sys_sysctl a very short deprecation period.
      
      Now that I know there are a few real users the only sane way to proceed
      with deprecation is to push the time limit out to a year or two work and
      work with distributions that have big testing pools like fedora core to
      find these last remaining users.
      
      Which means that the sys_sysctl interface needs to be maintained in the
      meantime.
      
      Since I have provided a technical measure that allows us to add new sysctl
      entries without reserving more binary numbers I believe that is enough to
      fix the sys_sysctl binary interface maintenance problems, because there is
      no longer a need to change the binary interface at all.
      
      Since the sys_sysctl implementation needs to stay around for a while and
      the worst of the maintenance issues that caused us to occasionally break
      the ABI have been addressed I don't see any advantage in continuing with
      the removal of sys_sysctl.
      
      So instead of merely increasing the deprecation period this patch removes
      the deprecation of sys_sysctl and modifies the kernel to compile the code
      in by default.
      
      With committing to maintain sys_sysctl we get all of the advantages of a
      fast interface for anything that needs it.  Currently sys_sysctl is about
      5x faster than /proc/sys, for the same string data.
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Acked-by: NAlan Cox <alan@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      13bb7e37
  17. 22 10月, 2006 1 次提交
    • J
      [PATCH] x86-64: Speed up dwarf2 unwinder · 690a973f
      Jan Beulich 提交于
      This changes the dwarf2 unwinder to do a binary search for CIEs
      instead of a linear work. The linker is unfortunately not
      able to build a proper lookup table at link time, instead it creates
      one at runtime as soon as the bootmem allocator is usable (so you'll continue
      using the linear lookup for the first [hopefully] few calls).
      The code should be ready to utilize a build-time created table once
      a fixed linker becomes available.
      Signed-off-by: NJan Beulich <jbeulich@novell.com>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      690a973f
  18. 21 10月, 2006 1 次提交
    • P
      [PATCH] uml: use DEFCONFIG_LIST to avoid reading host's config · b2670eac
      Paolo 'Blaisorblade' Giarrusso 提交于
      This should make sure that, for UML, host's configuration files are not
      considered, which avoids various pains to the user.  Our dependency are such
      that the obtained Kconfig will be valid and will lead to successful
      compilation - however they cannot prevent an user from disabling any boot
      device, and if an option is not set in the read .config (say
      /boot/config-XXX), with make menuconfig ARCH=um, it is not set.  This always
      disables UBD and all console I/O channels, which leads to non-working UML
      kernels, so this bothers users - especially now, since it will happen on
      almost every machine (/boot/config-`uname -r` exists almost on every machine).
       It can be workarounded with make defconfig ARCH=um, but it is non-obvious and
      can be avoided, so please _do_ merge this patch.
      
      Given the existence of options, it could be interesting to implement
      (additionally) "option required" - with it, Kconfig will refuse reading a
      .config file (from wherever it comes) if the given option is not set.  With
      this, one could mark with it the option characteristic of the given
      architecture (it was an old proposal of Roman Zippel, when I pointed out our
      problem):
      
      config UML
      	option required
      	default y
      
      However this should be further discussed:
      *) for x86, it must support constructs like:
      
      ==arch/i386/Kconfig==
      config 64BIT
      	option required
      	default n
      where Kconfig must require that CONFIG_64BIT is disabled or not present in the
      read .config.
      
      *) do we want to do such checks only for the starting defconfig or also for
         .config? Which leads to:
      *) I may want to port a x86_64 .config to x86 and viceversa, or even among more
         different archs. Should that be allowed, and in which measure (the user may
         force skipping the check for a .config or it is only given a warning by
         default)?
      
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Cc: <kbuild-devel@lists.sourceforge.net>
      Signed-off-by: NPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Cc: Jeff Dike <jdike@addtoit.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      b2670eac
  19. 04 10月, 2006 1 次提交
  20. 03 10月, 2006 1 次提交
  21. 02 10月, 2006 4 次提交
    • C
      [PATCH] replace cad_pid by a struct pid · 9ec52099
      Cedric Le Goater 提交于
      There are a few places in the kernel where the init task is signaled.  The
      ctrl+alt+del sequence is one them.  It kills a task, usually init, using a
      cached pid (cad_pid).
      
      This patch replaces the pid_t by a struct pid to avoid pid wrap around
      problem.  The struct pid is initialized at boot time in init() and can be
      modified through systctl with
      
      	/proc/sys/kernel/cad_pid
      
      [ I haven't found any distro using it ? ]
      
      It also introduces a small helper routine kill_cad_pid() which is used
      where it seemed ok to use cad_pid instead of pid 1.
      
      [akpm@osdl.org: cleanups, build fix]
      Signed-off-by: NCedric Le Goater <clg@fr.ibm.com>
      Cc: Eric W. Biederman <ebiederm@xmission.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      9ec52099
    • A
      [PATCH] introduce kernel_execve · 67608567
      Arnd Bergmann 提交于
      The use of execve() in the kernel is dubious, since it relies on the
      __KERNEL_SYSCALLS__ mechanism that stores the result in a global errno
      variable.  As a first step of getting rid of this, change all users to a
      global kernel_execve function that returns a proper error code.
      
      This function is a terrible hack, and a later patch removes it again after the
      kernel syscalls are gone.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Cc: Andi Kleen <ak@muc.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Cc: Ian Molton <spyro@f2s.com>
      Cc: Mikael Starvik <starvik@axis.com>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Cc: Hirokazu Takata <takata.hirokazu@renesas.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Kyle McMartin <kyle@mcmartin.ca>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
      Cc: Richard Curnow <rc@rc0.org.uk>
      Cc: William Lee Irwin III <wli@holomorphy.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Cc: Miles Bader <uclinux-v850@lsi.nec.co.jp>
      Cc: Chris Zankel <chris@zankel.net>
      Cc: "Luck, Tony" <tony.luck@intel.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      67608567
    • K
      [PATCH] IPC namespace core · 25b21cb2
      Kirill Korotaev 提交于
      This patch set allows to unshare IPCs and have a private set of IPC objects
      (sem, shm, msg) inside namespace.  Basically, it is another building block of
      containers functionality.
      
      This patch implements core IPC namespace changes:
      - ipc_namespace structure
      - new config option CONFIG_IPC_NS
      - adds CLONE_NEWIPC flag
      - unshare support
      
      [clg@fr.ibm.com: small fix for unshare of ipc namespace]
      [akpm@osdl.org: build fix]
      Signed-off-by: NPavel Emelianov <xemul@openvz.org>
      Signed-off-by: NKirill Korotaev <dev@openvz.org>
      Signed-off-by: NCedric Le Goater <clg@fr.ibm.com>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      25b21cb2
    • S
      [PATCH] namespaces: utsname: implement utsname namespaces · 4865ecf1
      Serge E. Hallyn 提交于
      This patch defines the uts namespace and some manipulators.
      Adds the uts namespace to task_struct, and initializes a
      system-wide init namespace.
      
      It leaves a #define for system_utsname so sysctl will compile.
      This define will be removed in a separate patch.
      
      [akpm@osdl.org: build fix, cleanup]
      Signed-off-by: NSerge Hallyn <serue@us.ibm.com>
      Cc: Kirill Korotaev <dev@openvz.org>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Cc: Herbert Poetzl <herbert@13thfloor.at>
      Cc: Andrey Savochkin <saw@sw.ru>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      4865ecf1
  22. 01 10月, 2006 2 次提交