1. 24 6月, 2005 5 次提交
  2. 22 6月, 2005 2 次提交
    • M
      [PATCH] VM: early zone reclaim · 753ee728
      Martin Hicks 提交于
      This is the core of the (much simplified) early reclaim.  The goal of this
      patch is to reclaim some easily-freed pages from a zone before falling back
      onto another zone.
      
      One of the major uses of this is NUMA machines.  With the default allocator
      behavior the allocator would look for memory in another zone, which might be
      off-node, before trying to reclaim from the current zone.
      
      This adds a zone tuneable to enable early zone reclaim.  It is selected on a
      per-zone basis and is turned on/off via syscall.
      
      Adding some extra throttling on the reclaim was also required (patch
      4/4).  Without the machine would grind to a crawl when doing a "make -j"
      kernel build.  Even with this patch the System Time is higher on
      average, but it seems tolerable.  Here are some numbers for kernbench
      runs on a 2-node, 4cpu, 8Gig RAM Altix in the "make -j" run:
      
      			wall  user   sys   %cpu  ctx sw.  sleeps
      			----  ----   ---   ----   ------  ------
      No patch		1009  1384   847   258   298170   504402
      w/patch, no reclaim     880   1376   667   288   254064   396745
      w/patch & reclaim       1079  1385   926   252   291625   548873
      
      These numbers are the average of 2 runs of 3 "make -j" runs done right
      after system boot.  Run-to-run variability for "make -j" is huge, so
      these numbers aren't terribly useful except to seee that with reclaim
      the benchmark still finishes in a reasonable amount of time.
      
      I also looked at the NUMA hit/miss stats for the "make -j" runs and the
      reclaim doesn't make any difference when the machine is thrashing away.
      
      Doing a "make -j8" on a single node that is filled with page cache pages
      takes 700 seconds with reclaim turned on and 735 seconds without reclaim
      (due to remote memory accesses).
      
      The simple zone_reclaim syscall program is at
      http://www.bork.org/~mort/sgi/zone_reclaim.cSigned-off-by: NMartin Hicks <mort@sgi.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      753ee728
    • I
      [PATCH] smp_processor_id() cleanup · 39c715b7
      Ingo Molnar 提交于
      This patch implements a number of smp_processor_id() cleanup ideas that
      Arjan van de Ven and I came up with.
      
      The previous __smp_processor_id/_smp_processor_id/smp_processor_id API
      spaghetti was hard to follow both on the implementational and on the
      usage side.
      
      Some of the complexity arose from picking wrong names, some of the
      complexity comes from the fact that not all architectures defined
      __smp_processor_id.
      
      In the new code, there are two externally visible symbols:
      
       - smp_processor_id(): debug variant.
      
       - raw_smp_processor_id(): nondebug variant. Replaces all existing
         uses of _smp_processor_id() and __smp_processor_id(). Defined
         by every SMP architecture in include/asm-*/smp.h.
      
      There is one new internal symbol, dependent on DEBUG_PREEMPT:
      
       - debug_smp_processor_id(): internal debug variant, mapped to
                                   smp_processor_id().
      
      Also, i moved debug_smp_processor_id() from lib/kernel_lock.c into a new
      lib/smp_processor_id.c file.  All related comments got updated and/or
      clarified.
      
      I have build/boot tested the following 8 .config combinations on x86:
      
       {SMP,UP} x {PREEMPT,!PREEMPT} x {DEBUG_PREEMPT,!DEBUG_PREEMPT}
      
      I have also build/boot tested x64 on UP/PREEMPT/DEBUG_PREEMPT.  (Other
      architectures are untested, but should work just fine.)
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NArjan van de Ven <arjan@infradead.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      39c715b7
  3. 21 6月, 2005 1 次提交
  4. 14 6月, 2005 1 次提交
  5. 09 6月, 2005 1 次提交
  6. 01 6月, 2005 12 次提交
  7. 29 5月, 2005 2 次提交
  8. 21 5月, 2005 2 次提交
  9. 17 5月, 2005 1 次提交
  10. 07 5月, 2005 1 次提交
  11. 06 5月, 2005 4 次提交
    • M
      [PATCH] cyrix: eliminate bad section references · a27e951f
      maximilian attems 提交于
      Fix cyrix section references:
       convert __initdata to __devinitdata.
      
      Error: ./arch/i386/kernel/cpu/mtrr/cyrix.o .text refers to 00000379
      R_386_32          .init.data
      Error: ./arch/i386/kernel/cpu/mtrr/cyrix.o .text refers to 00000399
      R_386_32          .init.data
      Error: ./arch/i386/kernel/cpu/mtrr/cyrix.o .text refers to 000003b3
      R_386_32          .init.data
      Error: ./arch/i386/kernel/cpu/mtrr/cyrix.o .text refers to 000003b9
      R_386_32          .init.data
      Error: ./arch/i386/kernel/cpu/mtrr/cyrix.o .text refers to 000003bf
      R_386_32          .init.data
      Signed-of-by: Nmaximilian attems <janitor@sternwelten.at>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      a27e951f
    • P
      [PATCH] Kprobes: Incorrect handling of probes on ret/lret instruction · 0b9e2cac
      Prasanna S Panchamukhi 提交于
      Kprobes could not handle the insertion of a probe on the ret/lret
      instruction and used to oops after single stepping since kprobes was
      modifying eip/rip incorrectly.  Adjustment of eip/rip is not required after
      single stepping in case of ret/lret instruction, because eip/rip points to
      the correct location after execution of the ret/lret instruction.  This
      patch fixes the above problem.
      Signed-off-by: NPrasanna S Panchamukhi <prasanna@in.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      0b9e2cac
    • P
      [PATCH] x86_64: make string func definition work as intended · 0c28130b
      Paolo 'Blaisorblade' Giarrusso 提交于
      In include/asm-x86_64/string.h there are such comments:
      
      /* Use C out of line version for memcmp */
      #define memcmp __builtin_memcmp
      int memcmp(const void * cs,const void * ct,size_t count);
      
      This would mean that if the compiler does not decide to use __builtin_memcmp,
      it emits a call to memcmp to be satisfied by the C out-of-line version in
      lib/string.c.  What happens is that after preprocessing, in lib/string.i you
      may find the definition of "__builtin_strcmp".
      
      Actually, by accident, in the object you will find the definition of strcmp
      and such (maybe a trick intended to redirect calls to __builtin_memcmp to the
      default memcmp when the definition is not expanded); however, this particular
      case is not a documented feature as far as I can see.
      
      Also, the EXPORT_SYMBOL does not work, so it's duplicated in the arch.
      
      I simply added some #undef to lib/string.c and removed the (now duplicated)
      exports in x86-64 and UML/x86_64 subarchs (the second ones are introduced by
      another patch I just posted for -mm).
      Signed-off-by: NPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      CC: Andi Kleen <ak@suse.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      0c28130b
    • A
      [PATCH] x86 stack initialisation fix · f48d9663
      Alexander Nyberg 提交于
      The recent change fix-crash-in-entrys-restore_all.patch
      
       	childregs->esp = esp;
      
       	p->thread.esp = (unsigned long) childregs;
      -	p->thread.esp0 = (unsigned long) (childregs+1);
      +	p->thread.esp0 = (unsigned long) (childregs+1) - 8;
      
       	p->thread.eip = (unsigned long) ret_from_fork;
      
      introduces an inconsistency between esp and esp0 before the task is run the
      first time.  esp0 is no longer the actual start of the stack, but 8 bytes
      off.
      
      This shows itself clearly in a scenario when a ptracer that is set to also
      ptrace eventual children traces program1 which then clones thread1.  Now
      the ptracer wants to modify the registers of thread1.  The x86 ptrace
      implementation bases it's knowledge about saved user-space registers upon
      p->thread.esp0.  But this will be a few bytes off causing certain writes to
      the kernel stack to overwrite a saved kernel function address making the
      kernel when actually running thread1 jump out into user-space.  Very
      spectacular.
      
      The testcase I've used is:
      /* start with strace -f ./a.out */
      #include <pthread.h>
      #include <stdio.h>
      
      void *do_thread(void *p)
      {
      	for (;;);
      }
      
      int main()
      {
      	pthread_t one;
      	pthread_create(&one, NULL, &do_thread, NULL);
      	for (;;);
      	return 0;
      }
      
      So, my solution is to instead of just adjusting esp0 that creates an
      inconsitent state I adjust where the user-space registers are saved with -8
      bytes.  This gives us the wanted extra bytes on the start of the stack and
      esp0 is now correct.  This solves the issues I saw from the original
      testcase from Mateusz Berezecki and has survived testing here.  I think
      this should go into -mm a round or two first however as there might be some
      cruft around depending on pt_regs lying on the start of the stack.  That
      however would have broken with the first change too!
      
      It's actually a 2-line diff but I had to move the comment of why the -8 bytes
      are there a few lines up. Thanks to Zwane for helping me with this.
      Signed-off-by: NAlexander Nyberg <alexn@telia.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      f48d9663
  12. 01 5月, 2005 8 次提交