Skip to content
  1. Apr 27, 2008
    • Yinghai Lu's avatar
      x86_64/mm: check and print vmemmap allocation continuous · c2b91e2e
      Yinghai Lu authored
      
      
      On big systems with lots of memory, don't print out too much during
      bootup, and make it easy to find if it is continuous.
      
      on 256G 8 sockets system will get
       [ffffe20000000000-ffffe20002bfffff] PMD -> [ffff810001400000-ffff810003ffffff] on node 0
      [ffffe2001c700000-ffffe2001c7fffff] potential offnode page_structs
       [ffffe20002c00000-ffffe2001c7fffff] PMD -> [ffff81000c000000-ffff8100255fffff] on node 0
      [ffffe20038700000-ffffe200387fffff] potential offnode page_structs
       [ffffe2001c800000-ffffe200387fffff] PMD -> [ffff810820200000-ffff81083c1fffff] on node 1
       [ffffe20040000000-ffffe2007fffffff] PUD ->ffff811027a00000 on node 2
       [ffffe20038800000-ffffe2003fffffff] PMD -> [ffff811020200000-ffff8110279fffff] on node 2
      [ffffe20054700000-ffffe200547fffff] potential offnode page_structs
       [ffffe20040000000-ffffe200547fffff] PMD -> [ffff811027c00000-ffff81103c3fffff] on node 2
      [ffffe20070700000-ffffe200707fffff] potential offnode page_structs
       [ffffe20054800000-ffffe200707fffff] PMD -> [ffff811820200000-ffff81183c1fffff] on node 3
       [ffffe20080000000-ffffe200bfffffff] PUD ->ffff81202fa00000 on node 4
       [ffffe20070800000-ffffe2007fffffff] PMD -> [ffff812020200000-ffff81202f9fffff] on node 4
      [ffffe2008c700000-ffffe2008c7fffff] potential offnode page_structs
       [ffffe20080000000-ffffe2008c7fffff] PMD -> [ffff81202fc00000-ffff81203c3fffff] on node 4
      [ffffe200a8700000-ffffe200a87fffff] potential offnode page_structs
       [ffffe2008c800000-ffffe200a87fffff] PMD -> [ffff812820200000-ffff81283c1fffff] on node 5
       [ffffe200c0000000-ffffe200ffffffff] PUD ->ffff813037a00000 on node 6
       [ffffe200a8800000-ffffe200bfffffff] PMD -> [ffff813020200000-ffff8130379fffff] on node 6
      [ffffe200c4700000-ffffe200c47fffff] potential offnode page_structs
       [ffffe200c0000000-ffffe200c47fffff] PMD -> [ffff813037c00000-ffff81303c3fffff] on node 6
       [ffffe200c4800000-ffffe200e07fffff] PMD -> [ffff813820200000-ffff81383c1fffff] on node 7
      
      instead of a very long print out...
      
      Signed-off-by: default avatarYinghai Lu <yhlu.kernel@gmail.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      c2b91e2e
    • Yinghai Lu's avatar
      x86_64: fix setup_node_bootmem to support big mem excluding with memmap · 1a27fc0a
      Yinghai Lu authored
      
      
      typical case: four sockets system, every node has 4g ram, and we are using:
      
      	memmap=10g$4g
      
      to mask out memory on node1 and node2
      
      when numa is enabled, early_node_mem is used to get node_data and node_bootmap.
      
      if it can not get memory from the same node with find_e820_area(), it will
      use alloc_bootmem to get buff from previous nodes.
      
      so check it and print out some info about it.
      
      need to move early_res_to_bootmem into every setup_node_bootmem.
      and it takes range that node has. otherwise alloc_bootmem could return addr
      that reserved early.
      
      depends on "mm: make reserve_bootmem can crossed the nodes".
      
      Signed-off-by: default avatarYinghai Lu <yhlu.kernel@gmail.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      1a27fc0a
    • Yinghai Lu's avatar
      x86_64: make reserve_bootmem_generic() use new reserve_bootmem() · 8b3cd09e
      Yinghai Lu authored
      
      
      "mm: make reserve_bootmem can crossed the nodes" provides new
      reserve_bootmem(), let reserve_bootmem_generic() use that.
      
      reserve_bootmem_generic() is used to reserve initramdisk, so this way
      we can make sure even when bootloader or kexec load ranges cross the
      node memory boundaries, reserve_bootmem still works.
      
      Signed-off-by: default avatarYinghai Lu <yhlu.kernel@gmail.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      8b3cd09e
    • Yinghai Lu's avatar
      mm: allow reserve_bootmem() cross nodes · a5645a61
      Yinghai Lu authored
      
      
      split reserve_bootmem_core() into two functions, one which checks
      conflicts, and one which sets the bits.
      
      and make reserve_bootmem to loop bdata_list to cross the nodes.
      
      user could be crashkernel and ramdisk..., in case the range provided
      by those externalities crosses the nodes.
      
      Signed-off-by: default avatarYinghai Lu <yhlu.kernel@gmail.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      a5645a61
    • Yinghai Lu's avatar
      mm: offset align in alloc_bootmem() · 9a2dc04c
      Yinghai Lu authored
      
      
      need offset alignment when node_boot_start's alignment is less than
      the alignment required.
      
      use local node_boot_start to match alignment - so don't add extra operation
      in search loop.
      
      Signed-off-by: default avatarYinghai Lu <yhlu.kernel@gmail.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      9a2dc04c
    • Yinghai Lu's avatar
      mm: fix alloc_bootmem_core to use fast searching for all nodes · ad09315c
      Yinghai Lu authored
      
      
      Make the nodes other than node 0 use bdata->last_success for fast
      search too.
      
      We need to use __alloc_bootmem_core() for vmemmap allocation for other
      nodes when numa and sparsemem/vmemmap are enabled.
      
      Also, make fail_block path increase i with incr only after ALIGN
      to avoid extra increase when size is larger than align.
      
      Signed-off-by: default avatarYinghai Lu <yhlu.kernel@gmail.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      ad09315c
    • Yinghai Lu's avatar
      mm: make mem_map allocation continuous · e123dd3f
      Yinghai Lu authored
      
      
      vmemmap allocation currently has this layout:
      
       [ffffe20000000000-ffffe200001fffff] PMD ->ffff810001400000 on node 0
       [ffffe20000200000-ffffe200003fffff] PMD ->ffff810001800000 on node 0
       [ffffe20000400000-ffffe200005fffff] PMD ->ffff810001c00000 on node 0
       [ffffe20000600000-ffffe200007fffff] PMD ->ffff810002000000 on node 0
       [ffffe20000800000-ffffe200009fffff] PMD ->ffff810002400000 on node 0
      ...
      
      note that there is a 2M hole between them - not optimal.
      
      the root cause is that usemap (24 bytes) will be allocated after every 2M
      mem_map, and it will push next vmemmap (2M) to the next (2M) alignment.
      
      solution: try to allocate the mem_map continously.
      
      after the patch, we get:
      
       [ffffe20000000000-ffffe200001fffff] PMD ->ffff810001400000 on node 0
       [ffffe20000200000-ffffe200003fffff] PMD ->ffff810001600000 on node 0
       [ffffe20000400000-ffffe200005fffff] PMD ->ffff810001800000 on node 0
       [ffffe20000600000-ffffe200007fffff] PMD ->ffff810001a00000 on node 0
       [ffffe20000800000-ffffe200009fffff] PMD ->ffff810001c00000 on node 0
      ...
      
      which is the ideal layout.
      
      and usemap will share a page because of they are allocated continuously too:
      
      sparse_early_usemap_alloc: usemap = ffff810024e00000 size = 24
      sparse_early_usemap_alloc: usemap = ffff810024e00080 size = 24
      sparse_early_usemap_alloc: usemap = ffff810024e00100 size = 24
      sparse_early_usemap_alloc: usemap = ffff810024e00180 size = 24
      ...
      
      so we make the bootmem allocation more compact and use less memory
      for usemap => mission accomplished ;-)
      
      Signed-off-by: default avatarYinghai Lu <yhlu.kernel@gmail.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      e123dd3f
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of... · 539a5fe2
      Linus Torvalds authored
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86-bigbox-bootparam
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86-bigbox-bootparam:
        x86, boot: Document for linked list of struct setup_data
        x86, boot: export linked list of struct setup_data via debugfs
        x86, boot: add linked list of struct setup_data
        x86, boot: add free_early to early reservation machanism
      539a5fe2
    • Huang, Ying's avatar
      x86, boot: Document for linked list of struct setup_data · fb884381
      Huang, Ying authored
      
      
      Documentation for linked list of struct setup_data.
      
      Signed-off-by: default avatarHuang Ying <ying.huang@intel.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      fb884381
    • Huang, Ying's avatar
      x86, boot: export linked list of struct setup_data via debugfs · c14b2adf
      Huang, Ying authored
      
      
      Export linked list of struct setup_data via debugfs.
      
      Signed-off-by: default avatarHuang Ying <ying.huang@intel.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      c14b2adf
    • Huang, Ying's avatar
      x86, boot: add linked list of struct setup_data · 8b664aa6
      Huang, Ying authored
      
      
      This patch adds a field of 64-bit physical pointer to NULL terminated
      single linked list of struct setup_data to real-mode kernel
      header. This is used as a more extensible boot parameters passing
      mechanism.
      
      Signed-off-by: default avatarHuang Ying <ying.huang@intel.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      8b664aa6
    • Huang, Ying's avatar
      x86, boot: add free_early to early reservation machanism · 50eae2a7
      Huang, Ying authored
      
      
      Add free_early to early reservation mechanism - this way early bootup
      failure paths can stop wasting memory.
      
      Signed-off-by: default avatarHuang Ying <ying.huang@intel.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      50eae2a7
    • Venki Pallipadi's avatar
      x86, PAT: disable /dev/mem mmap RAM with PAT · 0124cecf
      Venki Pallipadi authored
      
      
      disable /dev/mem mmap of RAM with PAT. It makes things safer and
      eliminates aliasing. A future improvement would be to avoid the
      range_is_allowed duplication.
      
      Signed-off-by: default avatarVenkatesh Pallipadi <venkatesh.pallipadi@intel.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      0124cecf
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86-fixes · 4a27214d
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86-fixes:
        x86 PAT: decouple from nonpromisc devmem
        x86 PAT: tone down debugging messages
      4a27214d
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb · c837c93a
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb:
        V4L/DVB (7751): ir-kbd-i2c: Save a temporary memory allocation in ir_probe
        V4L/DVB (7750): au0828/ cleanups and fixes
        V4L/DVB (7748): tuner-core: some adjustments at tuner logs, if debug enabled
        V4L/DVB (7746): pvrusb2: make signed one-bit bitfields unsigned
        V4L/DVB (7744): pvrusb2-dvb: add atsc/qam support for Hauppauge pvrusb2 model 751xx
        V4L/DVB (7742): cx88: Add support for the DViCO FusionHDTV_7_GOLD digital modes
        V4L/DVB (7741): s5h1411: Adding support for this ATSC/QAM demodulator
        V4L/DVB (7740): tuner-xc2028.c dubious !x & y
        V4L/DVB (7739): mt312.h: dubious one-bit signed bitfield
        V4L/DVB (7735): Fix compilation for au0828
        V4L/DVB (7734): em28xx: copy and paste error in em28xx_init_isoc
        V4L/DVB (7733): blackbird_find_mailbox negative return ignored in blackbird_initialize_codec()
        V4L/DVB (7732): vivi: fix a warning
      c837c93a
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of... · d485cb9a
      Linus Torvalds authored
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86-optimized-inlining
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86-optimized-inlining:
        generic: make optimized inlining arch-opt-in
        x86: add optimized inlining
      d485cb9a
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6 · 1292ebb8
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (61 commits)
        ide: sanitize handling of IDE_HFLAG_NO_SET_MODE host flag
        sis5513: fail early for unsupported chipsets
        it821x: fix kzalloc() failure handling
        qd65xx: use IDE_HFLAG_SINGLE host flag
        qd65xx: always use ->selectproc method
        ide-cd: put proc-related functions together under single ifdef
        ide-cd: Replace __FUNCTION__ with __func__
        IDE: Coding Style fixes to drivers/ide/ide-cd.c
        IDE: Coding Style fixes to drivers/ide/pci/cy82c693.c
        IDE: Coding Style fixes to drivers/ide/pci/it8213.c
        IDE: Coding Style fixes to drivers/ide/ide-floppy.c
        IDE: Coding Style fixes to drivers/ide/legacy/ali14xx.c
        IDE: Coding Style fixes to drivers/ide/legacy/hd.c
        IDE: Coding Style fixes to drivers/ide/pci/cmd640.c
        IDE: Coding Style fixes to drivers/ide/pci/opti621.c
        IDE: Coding Style fixes to drivers/ide/ide-pnp.c
        IDE: Coding Style fixes to drivers/ide/ide-proc.c
        IDE: Coding Style fixes to drivers/ide/legacy/ide-4drives.c
        IDE: Coding Style fixes to drivers/ide/legacy/umc8672.c
        IDE: Coding Style fixes to drivers/ide/pci/generic.c
        ...
      1292ebb8
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86-misc · b8228758
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86-misc: (28 commits)
        x86: section mismatch fixes, #3
        x86: section mismatch fixes, #2
        x86: pgtable_32.h - prototype and section mismatch fixes
        x86: unlock_ExtINT_logic() - fix section mismatch warnings
        x86: uniq_ioapic_id - fix section mismatch warning
        x86: trampoline_32.S - switch to .cpuinit.data
        x86: use get_bios_ebda()
        x86: remove duplicate get_bios_ebda() from rio.h
        x86: get_bios_ebda() requires asm/io.h
        x86: use cpumask function for present, possible, and online cpus
        x86: cleanup div_sc() usage
        x86: cleanup clocksource_hz2mult usage
        x86: remove unnecessary memset and NULL check after alloc_bootmem()
        x86: use bitmap library for pin_programmed
        x86: use MP_intsrc_info()
        x86: use BUILD_BUG_ON() for the size of struct intel_mp_floating
        x86_64 ia32 ptrace: convert to compat_arch_ptrace
        x86_64 ia32 ptrace: use compat_ptrace_request for siginfo
        x86 signals: lift set_fs
        x86 signals: lift flags diddling code
        ...
      b8228758
    • Ingo Molnar's avatar
      x86 PAT: decouple from nonpromisc devmem · 2a8a2719
      Ingo Molnar authored
      
      
      Linus pointed it out that PAT should not depend on NONPROMISC_DEVMEM.
      
      Also make PAT non-default.
      
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      2a8a2719
    • Linus Torvalds's avatar
      Merge branch 'agp-patches' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/agp-2.6 · d9c04d67
      Linus Torvalds authored
      * 'agp-patches' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/agp-2.6:
        agp: convert drivers/char/agp/frontend.c to use unlocked_ioctl
        agp: fix shadowed variable warning in amd-k7-agp.c
      d9c04d67
    • Linus Torvalds's avatar
      Merge branch 'drm-patches' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 · 4d9c55e4
      Linus Torvalds authored
      * 'drm-patches' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
        drm: _end is shadowing real _end, just rename it.
        drm/vbl rework: rework how the drm deals with vblank.
        drm: reorganise minor number handling using backported modesetting code.
        drm/i915: Handle tiled buffers in vblank tasklet
        drm/i965: On I965, use correct 3DSTATE_DRAWING_RECTANGLE command in vblank
        drm: Remove unneeded dma sync in ATI pcigart alloc
        drm: Fix mismerge of non-coherent DMA patch
      4d9c55e4
    • Al Viro's avatar
      Fix uninitialized 'copy' in unshare_files · 50704516
      Al Viro authored
      
      
      	Arrgghhh...
      
      Sorry about that, I'd been sure I'd folded that one, but it actually got
      lost.  Please apply - that breaks execve().
      
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Tested-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      50704516
  2. Apr 26, 2008