1. 12 5月, 2010 1 次提交
  2. 12 4月, 2010 1 次提交
  3. 13 3月, 2010 1 次提交
  4. 16 12月, 2009 1 次提交
  5. 24 8月, 2009 1 次提交
  6. 01 7月, 2009 1 次提交
  7. 14 1月, 2009 1 次提交
  8. 14 11月, 2008 1 次提交
  9. 14 10月, 2008 1 次提交
  10. 26 7月, 2008 9 次提交
  11. 25 3月, 2008 2 次提交
  12. 08 1月, 2008 1 次提交
  13. 27 11月, 2007 1 次提交
  14. 19 10月, 2007 1 次提交
  15. 26 7月, 2007 1 次提交
    • J
      Cleanup non-arch xtime uses, use get_seconds() or current_kernel_time(). · 2c6b47de
      john stultz 提交于
      This avoids use of the kernel-internal "xtime" variable directly outside
      of the actual time-related functions.  Instead, use the helper functions
      that we already have available to us.
      
      This doesn't actually change any behaviour, but this will allow us to
      fix the fact that "xtime" isn't updated very often with CONFIG_NO_HZ
      (because much of the realtime information is maintained as separate
      offsets to 'xtime'), which has caused interfaces that use xtime directly
      to get a time that is out of sync with the real-time clock by up to a
      third of a second or so.
      Signed-off-by: NJohn Stultz <johnstul@us.ibm.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      2c6b47de
  16. 09 12月, 2006 3 次提交
  17. 08 12月, 2006 1 次提交
  18. 01 10月, 2006 1 次提交
    • J
      [PATCH] csa: convert CONFIG tag for extended accounting routines · 8f0ab514
      Jay Lan 提交于
      There were a few accounting data/macros that are used in CSA but are #ifdef'ed
      inside CONFIG_BSD_PROCESS_ACCT.  This patch is to change those ifdef's from
      CONFIG_BSD_PROCESS_ACCT to CONFIG_TASK_XACCT.  A few defines are moved from
      kernel/acct.c and include/linux/acct.h to kernel/tsacct.c and
      include/linux/tsacct_kern.h.
      Signed-off-by: NJay Lan <jlan@sgi.com>
      Cc: Shailabh Nagar <nagar@watson.ibm.com>
      Cc: Balbir Singh <balbir@in.ibm.com>
      Cc: Jes Sorensen <jes@sgi.com>
      Cc: Chris Sturtivant <csturtiv@sgi.com>
      Cc: Tony Ernst <tee@sgi.com>
      Cc: Guillaume Thouvenin <guillaume.thouvenin@bull.net>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      8f0ab514
  19. 30 9月, 2006 1 次提交
  20. 15 7月, 2006 1 次提交
  21. 01 7月, 2006 1 次提交
  22. 28 6月, 2006 2 次提交
  23. 26 6月, 2006 4 次提交
    • K
      [PATCH] pacct: none-delayed process accounting accumulation · 77787bfb
      KaiGai Kohei 提交于
      In current 2.6.17 implementation, signal_struct refered from task_struct is
      used for per-process data structure.  The pacct facility also uses it as a
      per-process data structure to store stime, utime, minflt, majflt.  But those
      members are saved in __exit_signal().  It's too late.
      
      For example, if some threads exits at same time, pacct facility has a
      possibility to drop accountings for a part of those threads.  (see, the
      following 'The results of original 2.6.17 kernel') I think accounting
      information should be completely collected into the per-process data structure
      before writing out an accounting record.
      
      This patch fixes this matter.  Accumulation of stime, utime, minflt and majflt
      are done before generating accounting record.
      
      [mingo@elte.hu: fix acct_collect() siglock bug found by lockdep]
      Signed-off-by: NKaiGai Kohei <kaigai@ak.jp.nec.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      77787bfb
    • K
      [PATCH] pacct: avoidance to refer the last thread as a representation of the process · f6ec29a4
      KaiGai Kohei 提交于
      When pacct facility generate an 'ac_flag' field in accounting record, it
      refers a task_struct of the thread which died last in the process.  But any
      other task_structs are ignored.
      
      Therefore, pacct facility drops ASU flag even if root-privilege operations are
      used by any other threads except the last one.  In addition, AFORK flag is
      always set when the thread of group-leader didn't die last, although this
      process has called execve() after fork().
      
      We have a same matter in ac_exitcode.  The recorded ac_exitcode is an exit
      code of the last thread in the process.  There is a possibility this exitcode
      is not the group leader's one.
      f6ec29a4
    • K
      [PATCH] pacct: add pacct_struct to fix some pacct bugs. · 0e464814
      KaiGai Kohei 提交于
      The pacct facility need an i/o operation when an accounting record is
      generated.  There is a possibility to wake OOM killer up.  If OOM killer is
      activated, it kills some processes to make them release process memory
      regions.
      
      But acct_process() is called in the killed processes context before calling
      exit_mm(), so those processes cannot release own memory.  In the results, any
      processes stop in this point and it finally cause a system stall.
      0e464814
    • M
      [PATCH] Remove unecessary NULL check in kernel/acct.c · 11e64757
      Matt Helsley 提交于
      copy_process() appears to be the only caller of acct_clear_integrals() and
      does not pass in NULL task pointers.  Remove the unecessary check.
      Signed-off-by: NMatt Helsley <matthltc@us.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      11e64757
  24. 23 6月, 2006 1 次提交
  25. 01 4月, 2006 1 次提交
    • K
      [PATCH] Fix pacct bug in multithreading case. · bb231fe3
      KaiGai Kohei 提交于
      I noticed a bug on the process accounting facility.  In multi-threading
      process, some data would be recorded incorrectly when the group_leader dies
      earlier than one or more threads.  The attached patch fixes this problem.
      
      See below.  'bugacct' is a test program that create a worker thread after 4
      seconds sleeping, then the group_leader dies soon.  The worker thread
      consume CPU/Memory for 6 seconds, then exit.  We can estimate 10 seconds as
      etime and 6 seconds as stime + utime.  This is a sample program which the
      group_leader dies earlier than other threads.
      
      The results of same binary execution on different kernel are below.
      -- accounted records --------------------
               |   btime  | utime | stime | etime | minflt | majflt |   comm  |
      original | 13:16:40 |  0.00 |  0.00 |  6.10 |    171 |      0 | bugacct |
       patched | 13:20:21 |  5.83 |  0.18 | 10.03 |  32776 |      0 | bugacct |
      (*) bugacct allocates 128MB memory, thus 128MB / 4KB = 32768 of minflt is
          appropriate.
      
      -- Test results in original kernel ------
      $ date; time -p ./bugacct
      Tue Mar 28 13:16:36 JST 2006  <- But pacct said btime is 13:16:40
      real 10.11                    <- But pacct said etime is 6.10
      user 5.96                     <- But pacct said utime is 0.00
      sys 0.14                      <- But pacct said stime is 0.00
      $
      -- Test results in patched kernel -------
      $ date; time -p ./bugacct
      Tue Mar 28 13:20:21 JST 2006
      real 10.04
      user 5.83
      sys 0.19
      $
      
      In the original 2.6.16 kernel, pacct records btime, utime, stime, etime and
      minflt incorrectly.  In my opinion, this problem is caused by an assumption
      that group_leader dies last.
      
      The following section calculates process running time for etime and btime.
      But it means running time of the thread that dies last, not process.  The
      start_time of the first thread in the process (group_leader) should be
      reduced from uptime to calculate etime and btime correctly.
      
         ---- do_acct_process() in kernel/acct.c:
         /* calculate run_time in nsec*/
         do_posix_clock_monotonic_gettime(&uptime);
         run_time = (u64)uptime.tv_sec*NSEC_PER_SEC + uptime.tv_nsec;
         run_time -= (u64)current->start_time.tv_sec*NSEC_PER_SEC
                                         + current->start_time.tv_nsec;
         ----
      
      The following section calculates stime and utime of the process.
      But it might count the utime and stime of the group_leader duplicatly
      and ignore the utime and stime of the thread dies last, when one or
      more threads remain after group_leader dead.
      The ac_utime should be calculated as the sum of the signal->utime
      and utime of the thread dies last. The ac_stime should be done also.
      
         ---- do_acct_process() in kernel/acct.c:
         jiffies = cputime_to_jiffies(cputime_add(current->group_leader->utime,
                                                  current->signal->utime));
         ac.ac_utime = encode_comp_t(jiffies_to_AHZ(jiffies));
         jiffies = cputime_to_jiffies(cputime_add(current->group_leader->stime,
                                                  current->signal->stime));
         ac.ac_stime = encode_comp_t(jiffies_to_AHZ(jiffies));
         ----
      
      The part of the minflt/majflt calculation has same problem.
      This patch solves those problems, I think.
      
      Cc: Ingo Molnar <mingo@elte.hu>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      bb231fe3