linux/kernel/tsacct.c
<<
on vopt/spa opt/form opta on vop href="../linux+v3.9.1/kernel/tsacct.c">on voptimg src="../.static/gfx/right.png" alt=">>">ont/spa ontspa class="lxr_search">on v ="+search" method="post" onsubmit="return do_search(this);">on voptinput typv3.hidden" namv3.navtarget" ue="v3.">on voptinput typv3.text" namv3.search" id3.search">on voptbuttvaltypv3.submit">Searchon vopPrefs opt/a>ont/spa vop pt/div vop ptform acn> ="ajax+*" method="post" onsubmit="return false;">ontinput typv3.hidden" namv3.ajax_lookup" id3.ajax_lookup" ue="v3.">o vop pt/form o vop ptdiv class="headingbottvm">
tdiv id3.file_contents"
p p1t/a>tspa  class="comment">/*t/spa  
p p2t/a>tspa  class="comment"> * tsacct.c - System accounting over taskstats interfacet/spa  
p p3t/a>tspa  class="comment"> *t/spa  
p p4t/a>tspa  class="comment"> * Copyright (C) Jay Lan, vop p <jlan@sgi.com>t/spa  
p p5t/a>tspa  class="comment"> *t/spa  
p p6t/a>tspa  class="comment"> *t/spa  
p p7t/a>tspa  class="comment"> * This program is free software; you ca  redistribute it and/or modifyt/spa  
p p8t/a>tspa  class="comment"> * it under the terms of the GNU General Public License as published byt/spa  
p p9t/a>tspa  class="comment"> * the Free Software Foundan>
 ; either vers val2 of the License, ort/spa  
p /opta>tspa  class="comment"> * (at your ion>
 ) any later vers va.t/spa  
p 11t/a>tspa  class="comment"> *t/spa  
p 12t/a>tspa  class="comment"> * This program is distributed in the hope that it will be useful,t/spa  
p 13t/a>tspa  class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty oft/spa  
p 14t/a>tspa  class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See thet/spa  
p 15t/a>tspa  class="comment"> * GNU General Public License for more details.t/spa  
p 16t/a>tspa  class="comment"> *t/spa  
p 17t/a>tspa  class="comment"> */t/spa  
p 18t/a>
p 19t/a>#include <linux/kernel.ht/a>>
p 20t/a>#include <linux/sched.ht/a>>
p 21t/a>#include <linux/tsacct_kern.ht/a>>
p 22t/a>#include <linux/acct.ht/a>>
p 23t/a>#include <linux/jiffies.ht/a>>
p 24t/a>#include <linux/mm.ht/a>>
p 25t/a>
p 26t/a>tspa  class="comment">/*t/spa  
p 27t/a>tspa  class="comment"> * fill in basic accounting fieldst/spa  
p 28t/a>tspa  class="comment"> */t/spa  
p 29t/a>voidpta href="+code=bacct_add_tsk" class="sref">bacct_add_tskt/a>(structpta href="+code=user_namvspace" class="sref">user_namvspacet/a> *ta href="+code=user_ns" class="sref">user_nst/a>,
p 30t/a>                   structpta href="+code=pid_namvspace" class="sref">pid_namvspacet/a> *ta href="+code=pid_ns" class="sref">pid_nst/a>,
p 31t/a>                   structpta href="+code=taskstats" class="sref">taskstatst/a> *ta href="+code=stats" class="sref">statst/a>, structpta href="+code=task_struct" class="sref">task_structt/a> *ta href="+code=tsk" class="sref">tskt/a>)
p 32t/a>{
p 33t/a>        const structpta href="+code=cred" class="sref">credt/a> *ta href="+code=tcred" class="sref">tcredt/a>;
p 34t/a>        structpta href="+code=timvspec" class="sref">timvspect/a> ta href="+code=uptimv" class="sref">uptimvt/a>, ta href="+code=ts" class="sref">tst/a>;
p 35t/a>        ta href="+code=cputimv_t" class="sref">cputimv_tt/a> ta href="+code=utimv" class="sref">utimvt/a>, ta href="+code=stimv" class="sref">stimvt/a>, ta href="+code=utimvscaled" class="sref">utimvscaledt/a>, ta href="+code=stimvscaled" class="sref">stimvscaledt/a>;
p 36t/a>        ta href="+code=u64" class="sref">u64t/a> ta href="+code=ac_etimv" class="sref">ac_etimvt/a>;
p 37t/a>
p 38t/a>        ta href="+code=BUILD_BUG_ON" class="sref">BUILD_BUG_ONt/a>(ta href="+code=TS_COMM_LEN" class="sref">TS_COMM_LENt/a> < ta href="+code=TASK_COMM_LEN" class="sref">TASK_COMM_LENt/a>);
p 39t/a>
p 40t/a>        tspa  class="comment">/* calculate task elapsed timv in timvspec */t/spa  
p 41t/a>        ta href="+code=do_posix_clock_monotonic_gettimv" class="sref">do_posix_clock_monotonic_gettimvt/a>(&ta href="+code=uptimv" class="sref">uptimvt/a>);
p 42t/a>        ta href="+code=ts" class="sref">tst/a> =pta href="+code=timvspec_sub" class="sref">timvspec_subt/a>(ta href="+code=uptimv" class="sref">uptimvt/a>, ta href="+code=tsk" class="sref">tskt/a>->ta href="+code=start_timv" class="sref">start_timvt/a>);
p 43t/a>        tspa  class="comment">/* rebase elapsed timv to usec (should never be negative) */t/spa  
p 44t/a>        ta href="+code=ac_etimv" class="sref">ac_etimvt/a> =pta href="+code=timvspec_to_ns" class="sref">timvspec_to_nst/a>(&ta href="+code=ts" class="sref">tst/a>);
p 45t/a>        ta href="+code=do_div" class="sref">do_divt/a>(ta href="+code=ac_etimv" class="sref">ac_etimvt/a>, ta href="+code=NSEC_PER_USEC" class="sref">NSEC_PER_USECt/a>);
p 46t/a>        ta href="+code=stats" class="sref">statst/a>->ta href="+code=ac_etimv" class="sref">ac_etimvt/a> =pta href="+code=ac_etimv" class="sref">ac_etimvt/a>;
p 47t/a>        ta href="+code=stats" class="sref">statst/a>->ta href="+code=ac_btimv" class="sref">ac_btimvt/a> =pta href="+code=get_seconds" class="sref">get_secondst/a>() - ta href="+code=ts" class="sref">tst/a>.ta href="+code=tv_sec" class="sref">tv_sect/a>;
p 48t/a>        if (ta href="+code=thread_group_leader" class="sref">thread_group_leadert/a>(ta href="+code=tsk" class="sref">tskt/a>)) {
p 49t/a>                ta href="+code=stats" class="sref">statst/a>->ta href="+code=ac_exitcode" class="sref">ac_exitcodet/a> =pta href="+code=tsk" class="sref">tskt/a>->ta href="+code=exit_code" class="sref">exit_codet/a>;
p 50t/a>                if (ta href="+code=tsk" class="sref">tskt/a>->ta href="+code=flags" class="sref">flagst/a> &pta href="+code=PF_FORKNOEXEC" class="sref">PF_FORKNOEXECt/a>)
p 51t/a>                        ta href="+code=stats" class="sref">statst/a>->ta href="+code=ac_flag" class="sref">ac_flagt/a> |=pta href="+code=AFORK" class="sref">AFORKt/a>;
p 52t/a>        }
p 53t/a>        if (ta href="+code=tsk" class="sref">tskt/a>->ta href="+code=flags" class="sref">flagst/a> &pta href="+code=PF_SUPERPRIV" class="sref">PF_SUPERPRIVt/a>)
p 54t/a>                ta href="+code=stats" class="sref">statst/a>->ta href="+code=ac_flag" class="sref">ac_flagt/a> |=pta href="+code=ASU" class="sref">ASUt/a>;
p 55t/a>        if (ta href="+code=tsk" class="sref">tskt/a>->ta href="+code=flags" class="sref">flagst/a> &pta href="+code=PF_DUMPCORE" class="sref">PF_DUMPCOREt/a>)
p 56t/a>                ta href="+code=stats" class="sref">statst/a>->ta href="+code=ac_flag" class="sref">ac_flagt/a> |=pta href="+code=ACORE" class="sref">ACOREt/a>;
p 57t/a>        if (ta href="+code=tsk" class="sref">tskt/a>->ta href="+code=flags" class="sref">flagst/a> &pta href="+code=PF_SIGNALED" class="sref">PF_SIGNALEDt/a>)
p 58t/a>                ta href="+code=stats" class="sref">statst/a>->ta href="+code=ac_flag" class="sref">ac_flagt/a> |=pta href="+code=AXSIG" class="sref">AXSIGt/a>;
p 59t/a>        ta href="+code=stats" class="sref">statst/a>->ta href="+code=ac_nice" class="sref">ac_nicet/a>   =pta href="+code=task_nice" class="sref">task_nicet/a>(ta href="+code=tsk" class="sref">tskt/a>);
p 60t/a>        ta href="+code=stats" class="sref">statst/a>->ta href="+code=ac_sched" class="sref">ac_schedt/a>  =pta href="+code=tsk" class="sref">tskt/a>->ta href="+code=policy" class="sref">policyt/a>;
p 61t/a>        ta href="+code=stats" class="sref">statst/a>->ta href="+code=ac_pid" class="sref">ac_pidt/a>    =pta href="+code=task_pid_nr_ns" class="sref">task_pid_nr_nst/a>(ta href="+code=tsk" class="sref">tskt/a>, ta href="+code=pid_ns" class="sref">pid_nst/a>);
p 62t/a>        ta href="+code=rcu_read_lock" class="sref">rcu_read_lockt/a>();
p 63t/a>        ta href="+code=tcred" class="sref">tcredt/a> =pta href="+code=__task_cred" class="sref">__task_credt/a>(ta href="+code=tsk" class="sref">tskt/a>);
p 64t/a>        ta href="+code=stats" class="sref">statst/a>->ta href="+code=ac_uid" class="sref">ac_uidt/a>    =pta href="+code=from_kuid_munged" class="sref">from_kuid_mungedt/a>(ta href="+code=user_ns" class="sref">user_nst/a>, ta href="+code=tcred" class="sref">tcredt/a>->ta href="+code=uid" class="sref">uidt/a>);
p 65t/a>        ta href="+code=stats" class="sref">statst/a>->ta href="+code=ac_gid" class="sref">ac_gidt/a>    =pta href="+code=from_kgid_munged" class="sref">from_kgid_mungedt/a>(ta href="+code=user_ns" class="sref">user_nst/a>, ta href="+code=tcred" class="sref">tcredt/a>->ta href="+code=gid" class="sref">gidt/a>);
p 66t/a>        ta href="+code=stats" class="sref">statst/a>->ta href="+code=ac_ppid" class="sref">ac_ppidt/a>   =pta href="+code=pid_alive" class="sref">pid_alivet/a>(ta href="+code=tsk" class="sref">tskt/a>) ?
p 67t/a>                ta href="+code=task_tgid_nr_ns" class="sref">task_tgid_nr_nst/a>(ta href="+code=rcu_dereference" class="sref">rcu_dereferencet/a>(ta href="+code=tsk" class="sref">tskt/a>->ta href="+code=real_parent" class="sref">real_parentt/a>), ta href="+code=pid_ns" class="sref">pid_nst/a>) : 0;
p 68t/a>        ta href="+code=rcu_read_unlock" class="sref">rcu_read_unlockt/a>();
p 69t/a>
p 70t/a>        ta href="+code=task_cputimv" class="sref">task_cputimvt/a>(ta href="+code=tsk" class="sref">tskt/a>, &ta href="+code=utimv" class="sref">utimvt/a>, &ta href="+code=stimv" class="sref">stimvt/a>);
p 71t/a>        ta href="+code=stats" class="sref">statst/a>->ta href="+code=ac_utimv" class="sref">ac_utimvt/a> =pta href="+code=cputimv_to_usecs" class="sref">cputimv_to_usecst/a>(ta href="+code=utimv" class="sref">utimvt/a>);
p 72t/a>        ta href="+code=stats" class="sref">statst/a>->ta href="+code=ac_stimv" class="sref">ac_stimvt/a> =pta href="+code=cputimv_to_usecs" class="sref">cputimv_to_usecst/a>(ta href="+code=stimv" class="sref">stimvt/a>);
p 73t/a>
p 74t/a>        ta href="+code=task_cputimv_scaled" class="sref">task_cputimv_scaledt/a>(ta href="+code=tsk" class="sref">tskt/a>, &ta href="+code=utimvscaled" class="sref">utimvscaledt/a>, &ta href="+code=stimvscaled" class="sref">stimvscaledt/a>);
p 75t/a>        ta href="+code=stats" class="sref">statst/a>->ta href="+code=ac_utimvscaled" class="sref">ac_utimvscaledt/a> =pta href="+code=cputimv_to_usecs" class="sref">cputimv_to_usecst/a>(ta href="+code=utimvscaled" class="sref">utimvscaledt/a>);
p 76t/a>        ta href="+code=stats" class="sref">statst/a>->ta href="+code=ac_stimvscaled" class="sref">ac_stimvscaledt/a> =pta href="+code=cputimv_to_usecs" class="sref">cputimv_to_usecst/a>(ta href="+code=stimvscaled" class="sref">stimvscaledt/a>);
p 77t/a>
p 78t/a>        ta href="+code=stats" class="sref">statst/a>->ta href="+code=ac_minflt" class="sref">ac_minfltt/a> =pta href="+code=tsk" class="sref">tskt/a>->ta href="+code=min_flt" class="sref">min_fltt/a>;
p 79t/a>        ta href="+code=stats" class="sref">statst/a>->ta href="+code=ac_majflt" class="sref">ac_majfltt/a> =pta href="+code=tsk" class="sref">tskt/a>->ta href="+code=maj_flt" class="sref">maj_fltt/a>;
p 80t/a>
p 81t/a>        ta href="+code=strncpy" class="sref">strncpyt/a>(ta href="+code=stats" class="sref">statst/a>->ta href="+code=ac_comm" class="sref">ac_commt/a>, ta href="+code=tsk" class="sref">tskt/a>->ta href="+code=comm" class="sref">commt/a>, sizeof(ta href="+code=stats" class="sref">statst/a>->ta href="+code=ac_comm" class="sref">ac_commt/a>));
p 82t/a>}
p 83t/a>
p 84t/a>
p 85t/a>#ifdef ta href="+code=CONFIG_TASK_XACCT" class="sref">CONFIG_TASK_XACCTt/a>
p 86t/a>
p 87t/a>#define ta href="+code=KB" class="sref">KBt/a> 1024
p 88t/a>#define ta href="+code=MB" class="sref">MBt/a> (1024*ta href="+code=KB" class="sref">KBt/a>)
p 89t/a>#define ta href="+code=KB_MASK" class="sref">KB_MASKt/a> (~(ta href="+code=KB" class="sref">KBt/a>-1))
p 9opta>tspa  class="comment">/*t/spa  
p 91t/a>tspa  class="comment"> * fill in extended accounting fieldst/spa  
p 92t/a>tspa  class="comment"> */t/spa  
p 93t/a>voidpta href="+code=xacct_add_tsk" class="sref">xacct_add_tskt/a>(structpta href="+code=taskstats" class="sref">taskstatst/a> *ta href="+code=stats" class="sref">statst/a>, structpta href="+code=task_struct" class="sref">task_structt/a> *ta href="+code=p" class="sref">pt/a>)
p 94t/a>{
p 95t/a>        structpta href="+code=mm_struct" class="sref">mm_structt/a> *ta href="+code=mm" class="sref">mmt/a>;
p 96t/a>
p 97t/a>        tspa  class="comment">/* convert pages-usec to Mbyte-usec */t/spa  
p 98t/a>        ta href="+code=stats" class="sref">statst/a>->ta href="+code=coremem" class="sref">corememt/a> =pta href="+code=p" class="sref">pt/a>->ta href="+code=acct_rss_mem1" class="sref">acct_rss_mem1t/a> *pta href="+code=PAGE_SIZE" class="sref">PAGE_SIZEt/a> / ta href="+code=MB" class="sref">MBt/a>;
p 99t/a>        ta href="+code=stats" class="sref">statst/a>->ta href="+code=virtmem" class="sref">virtmemt/a> =pta href="+code=p" class="sref">pt/a>->ta href="+code=acct_vm_mem1" class="sref">acct_vm_mem1t/a> *pta href="+code=PAGE_SIZE" class="sref">PAGE_SIZEt/a> / ta href="+code=MB" class="sref">MBt/a>;
p100t/a>        ta href="+code=mm" class="sref">mmt/a> =pta href="+code=get_task_mm" class="sref">get_task_mmt/a>(ta href="+code=p" class="sref">pt/a>);
p101t/a>        if (ta href="+code=mm" class="sref">mmt/a>) {
p102t/a>                tspa  class="comment">/* adjust to KB unit */t/spa  
p103t/a>                ta href="+code=stats" class="sref">statst/a>->ta href="+code=hiwater_rss" class="sref">hiwater_rsst/a>   =pta href="+code=get_mm_hiwater_rss" class="sref">get_mm_hiwater_rsst/a>(ta href="+code=mm" class="sref">mmt/a>) *pta href="+code=PAGE_SIZE" class="sref">PAGE_SIZEt/a> / ta href="+code=KB" class="sref">KBt/a>;
p104t/a>                ta href="+code=stats" class="sref">statst/a>->ta href="+code=hiwater_vm" class="sref">hiwater_vmt/a>    =pta href="+code=get_mm_hiwater_vm" class="sref">get_mm_hiwater_vmt/a>(ta href="+code=mm" class="sref">mmt/a>)  *pta href="+code=PAGE_SIZE" class="sref">PAGE_SIZEt/a> / ta href="+code=KB" class="sref">KBt/a>;
p105t/a>                ta href="+code=mmput" class="sref">mmputt/a>(ta href="+code=mm" class="sref">mmt/a>);
p106t/a>        }
p107t/a>        ta href="+code=stats" class="sref">statst/a>->ta href="+code=read_char" class="sref">read_chart/a>        =pta href="+code=p" class="sref">pt/a>->ta href="+code=ioac" class="sref">ioact/a>.ta href="+code=rchar" class="sref">rchart/a> &pta href="+code=KB_MASK" class="sref">KB_MASKt/a>;
p108t/a>        ta href="+code=stats" class="sref">statst/a>->ta href="+code=write_char" class="sref">write_chart/a>       =pta href="+code=p" class="sref">pt/a>->ta href="+code=ioac" class="sref">ioact/a>.ta href="+code=wchar" class="sref">wchart/a> &pta href="+code=KB_MASK" class="sref">KB_MASKt/a>;
p109t/a>        ta href="+code=stats" class="sref">statst/a>->ta href="+code=read_syscalls" class="sref">read_syscallst/a>    =pta href="+code=p" class="sref">pt/a>->ta href="+code=ioac" class="sref">ioact/a>.ta href="+code=syscr" class="sref">syscrt/a> &pta href="+code=KB_MASK" class="sref">KB_MASKt/a>;
p110t/a>        ta href="+code=stats" class="sref">statst/a>->ta href="+code=write_syscalls" class="sref">write_syscallst/a>   =pta href="+code=p" class="sref">pt/a>->ta href="+code=ioac" class="sref">ioact/a>.ta href="+code=syscw" class="sref">syscwt/a> &pta href="+code=KB_MASK" class="sref">KB_MASKt/a>;
p111t/a>#ifdef ta href="+code=CONFIG_TASK_IO_ACCOUNTING" class="sref">CONFIG_TASK_IO_ACCOUNTINGt/a>
p112t/a>        ta href="+code=stats" class="sref">statst/a>->ta href="+code=read_bytes" class="sref">read_bytest/a>       =pta href="+code=p" class="sref">pt/a>->ta href="+code=ioac" class="sref">ioact/a>.ta href="+code=read_bytes" class="sref">read_bytest/a> &pta href="+code=KB_MASK" class="sref">KB_MASKt/a>;
p113t/a>        ta href="+code=stats" class="sref">statst/a>->ta href="+code=write_bytes" class="sref">write_bytest/a>      =pta href="+code=p" class="sref">pt/a>->ta href="+code=ioac" class="sref">ioact/a>.ta href="+code=write_bytes" class="sref">write_bytest/a> &pta href="+code=KB_MASK" class="sref">KB_MASKt/a>;
p114t/a>        ta href="+code=stats" class="sref">statst/a>->ta href="+code=cancelled_write_bytes" class="sref">cancelled_write_bytest/a> =pta href="+code=p" class="sref">pt/a>->ta href="+code=ioac" class="sref">ioact/a>.ta href="+code=cancelled_write_bytes" class="sref">cancelled_write_bytest/a> &pta href="+code=KB_MASK" class="sref">KB_MASKt/a>;
p115t/a>#else
p116t/a>        ta href="+code=stats" class="sref">statst/a>->ta href="+code=read_bytes" class="sref">read_bytest/a>       =p0;
p117t/a>        ta href="+code=stats" class="sref">statst/a>->ta href="+code=write_bytes" class="sref">write_bytest/a>      =p0;
p118t/a>        ta href="+code=stats" class="sref">statst/a>->ta href="+code=cancelled_write_bytes" class="sref">cancelled_write_bytest/a> =p0;
p119t/a>#endif
p120t/a>}
p121t/a>#undef ta href="+code=KB" class="sref">KBt/a>
p122t/a>#undef ta href="+code=MB" class="sref">MBt/a>
p123t/a>
p124t/a>static voidpta href="+code=__acct_update_integrals" class="sref">__acct_update_integralst/a>(structpta href="+code=task_struct" class="sref">task_structt/a> *ta href="+code=tsk" class="sref">tskt/a>,
p125t/a>                                    ta href="+code=cputimv_t" class="sref">cputimv_tt/a> ta href="+code=utimv" class="sref">utimvt/a>, ta href="+code=cputimv_t" class="sref">cputimv_tt/a> ta href="+code=stimv" class="sref">stimvt/a>)
p126t/a>{
p127t/a>        if (ta href="+code=likely" class="sref">likelyt/a>(ta href="+code=tsk" class="sref">tskt/a>->ta href="+code=mm" class="sref">mmt/a>)) {
p128t/a>                ta href="+code=cputimv_t" class="sref">cputimv_tt/a> ta href="+code=timv" class="sref">timvt/a>, ta href="+code=dtimv" class="sref">dtimvt/a>;
p129t/a>                structpta href="+code=timvval" class="sref">timvvalt/a> ta href="+code=ue="v" class="sref">ve="vt/a>;
p130t/a>                unsigned longpta href="+code=flags" class="sref">flagst/a>;
p131t/a>                ta href="+code=u64" class="sref">u64t/a> ta href="+code=delta" class="sref">deltat/a>;
p132t/a>
p133t/a>                ta href="+code=local_irq_save" class="sref">local_irq_savet/a>(ta href="+code=flags" class="sref">flagst/a>);
p134t/a>                ta href="+code=timv" class="sref">timvt/a> =pta href="+code=stimv" class="sref">stimvt/a> + ta href="+code=utimv" class="sref">utimvt/a>;
p135t/a>                ta href="+code=dtimv" class="sref">dtimvt/a> =pta href="+code=timv" class="sref">timvt/a> - ta href="+code=tsk" class="sref">tskt/a>->ta href="+code=acct_timvxpd" class="sref">acct_timvxpdt/a>;
p136t/a>                ta href="+code=jiffies_to_timvval" class="sref">jiffies_to_timvvalt/a>(ta href="+code=cputimv_to_jiffies" class="sref">cputimv_to_jiffiest/a>(ta href="+code=dtimv" class="sref">dtimvt/a>), &ta href="+code=ue="v" class="sref">ve="vt/a>);
p137t/a>                ta href="+code=delta" class="sref">deltat/a> =pta href="+code=ue="v" class="sref">ve="vt/a>.ta href="+code=tv_sec" class="sref">tv_sect/a>;
p138t/a>                ta href="+code=delta" class="sref">deltat/a> =pta href="+code=delta" class="sref">deltat/a> *pta href="+code=USEC_PER_SEC" class="sref">USEC_PER_SECt/a> + ta href="+code=ue="v" class="sref">ve="vt/a>.ta href="+code=tv_usec" class="sref">tv_usect/a>;
p139t/a>
p140t/a>                if (ta href="+code=delta" class="sref">deltat/a> ==p0)
p141t/a>                        goto ta href="+code=out" class="sref">outt/a>;
p142t/a>                ta href="+code=tsk" class="sref">tskt/a>->ta href="+code=acct_timvxpd" class="sref">acct_timvxpdt/a> =pta href="+code=timv" class="sref">timvt/a>;
p143t/a>                ta href="+code=tsk" class="sref">tskt/a>->ta href="+code=acct_rss_mem1" class="sref">acct_rss_mem1t/a> +=pta href="+code=delta" class="sref">deltat/a> *pta href="+code=get_mm_rss" class="sref">get_mm_rsst/a>(ta href="+code=tsk" class="sref">tskt/a>->ta href="+code=mm" class="sref">mmt/a>);
p144t/a>                ta href="+code=tsk" class="sref">tskt/a>->ta href="+code=acct_vm_mem1" class="sref">acct_vm_mem1t/a> +=pta href="+code=delta" class="sref">deltat/a> *pta href="+code=tsk" class="sref">tskt/a>->ta href="+code=mm" class="sref">mmt/a>->ta href="+code=total_vm" class="sref">total_vmt/a>;
p145t/a>        ta href="+code=out" class="sref">outt/a>:
p146t/a>                ta href="+code=local_irq_restore" class="sref">local_irq_restoret/a>(ta href="+code=flags" class="sref">flagst/a>);
p147t/a>        }
p148t/a>}
p149t/a>
p15opta>tspa  class="comment">/**t/spa  
p151t/a>tspa  class="comment"> * acct_update_integrals - update mm integral fields in task_structt/spa  
p152t/a>tspa  class="comment"> * @tsk: task_struct for accountingt/spa  
p153t/a>tspa  class="comment"> */t/spa  
p154t/a>voidpta href="+code=acct_update_integrals" class="sref">acct_update_integralst/a>(structpta href="+code=task_struct" class="sref">task_structt/a> *ta href="+code=tsk" class="sref">tskt/a>)
p155t/a>{
p156t/a>        ta href="+code=cputimv_t" class="sref">cputimv_tt/a> ta href="+code=utimv" class="sref">utimvt/a>, ta href="+code=stimv" class="sref">stimvt/a>;
p157t/a>
p158t/a>        ta href="+code=task_cputimv" class="sref">task_cputimvt/a>(ta href="+code=tsk" class="sref">tskt/a>, &ta href="+code=utimv" class="sref">utimvt/a>, &ta href="+code=stimv" class="sref">stimvt/a>);
p159t/a>        ta href="+code=__acct_update_integrals" class="sref">__acct_update_integralst/a>(ta href="+code=tsk" class="sref">tskt/a>, ta href="+code=utimv" class="sref">utimvt/a>, ta href="+code=stimv" class="sref">stimvt/a>);
p160t/a>}
p161t/a>
p162t/a>tspa  class="comment">/**t/spa  
p163t/a>tspa  class="comment"> * acct_account_cputimv - update mm integral after cputimv updatet/spa  
p164t/a>tspa  class="comment"> * @tsk: task_struct for accountingt/spa  
p165t/a>tspa  class="comment"> */t/spa  
p166t/a>voidpta href="+code=acct_account_cputimv" class="sref">acct_account_cputimvt/a>(structpta href="+code=task_struct" class="sref">task_structt/a> *ta href="+code=tsk" class="sref">tskt/a>)
p167t/a>{
p168t/a>        ta href="+code=__acct_update_integrals" class="sref">__acct_update_integralst/a>(ta href="+code=tsk" class="sref">tskt/a>, ta href="+code=tsk" class="sref">tskt/a>->ta href="+code=utimv" class="sref">utimvt/a>, ta href="+code=tsk" class="sref">tskt/a>->ta href="+code=stimv" class="sref">stimvt/a>);
p169t/a>}
p170t/a>
p171t/a>tspa  class="comment">/**t/spa  
p172t/a>tspa  class="comment"> * acct_clear_integrals - clear the mm integral fields in task_structt/spa  
c2a" class="sref">deltat/a"> * acct_account_cputimv  accountingt/spa  whosepa  
p 74t/a>        t1a hre17ment"> * @tsk: task_struct fonel/tsacct.c#L166" id3.L166" class="ine" namv13.L75">p 75t/a>        t1a hre1="+codcct_account_cputimv" clasar the mm integccount_cputimvt/a>(sar the mm integ+code=task_struct" class="sref">task_structt/a> *ta href="+code=tsk" class="sref">tskt/a>)
p 76t/a>        t1a hre17l/tsacct.c#L127" id3.L127" class="ine" namv13.L77">p 77t/a>
st/a>->ta href="+code=acct_timvxpd" class="sref">acct_timvxpdt/a> =pta href="+code=timv" +code=tsk" class="sref">tskt/aa href="kernel/tsacct.c#L170" id3.L170" cla3 class="sref">cputimv_to_use1st/a>1>ta href="+code=ac_minflt" class="sref">acct_rss_mem1t/a> +=pta href="+code=delta" class="sref">deltat/a> *pta href="="kernel/tsacct.c#L170" id3.L170"rnel/tsacstats" class="sref">stat1st/a>1>ta href="+code=ac_majflt"class="sref">acct_vm_mem1t/a> +=pta href="+code=delta" class="sref">deltat/a> *pta href="="kernel/tsacct.c#L170" id3.L170el/tsacct1.c#L81" id3.L81" class="1line"18" namv3.L161">p161t/a>
st1rncpy1/a>(ta" namv3.L120">p120t/a>}



T/tsorigincleLXR softwls -byel/ts.L120">p1http://source65"ge.net/projects/lxL">LXR " clss="y"+codethis t/aerilasscleversion-bye.L120">p1mailto:lxL@lass=.no">lxL@lass=.noref=" lxL.lass=.no kindly sacted-bye.L120">p1http://www.#inpill-laspro.no">Rinpill Laspro AS"+codeprovid.L1of Lasuxa hreullear_and oaerations services since 1995.