From: Jay Lan <jlan@sgi.com>
To: Andrew Morton <akpm@osdl.org>
Cc: Guillaume Thouvenin <guillaume.thouvenin@bull.net>,
lkml <linux-kernel@vger.kernel.org>,
Tim Schmielau <tim@physik3.uni-rostock.de>,
kaigai@ak.jp.nec.com, jbarnes@sgi.com
Subject: Re: [PATCH 2.6.11-rc4-mm1] end-of-proces handling for acct-csa
Date: Mon, 28 Feb 2005 10:56:57 -0800 [thread overview]
Message-ID: <42236979.5030702@sgi.com> (raw)
In-Reply-To: <1109314660.1738.206.camel@frecb000711.frec.bull.fr>
Hi Andrew,
You asked:
>
> In other words: given that ELSA can do its thing via existing accounting
> interfaces and a fork notifier, why does CSA need to add lots more kernel
> code?
And i explained:
> Here are some codes from do_exit() starting line 813 (based on
> 2.6.11-rc4-mm1):
>
> 813 acct_update_integrals(tsk);
> 814 update_mem_hiwater(tsk);
> 815 group_dead = atomic_dec_and_test(&tsk->signal->live);
> 816 if (group_dead) {
> 817 del_timer_sync(&tsk->signal->real_timer);
> 818 acct_process(code);
> 819 }
> 820 exit_mm(tsk);
>
> The acct_process() is called to save off BSD accounting data at
> line 818. The next statement at 820, tsk->mm is disposed and all
> data saved at tsk->mm is gone, including memory hiwater marks
> information saved at line 814. The complete tsk is disposed
> before exit of do_exit() routine.
I was hoping Guilluame could jump in himself...
But, in a separate discussion thread, he wrote:
>> (Jay asked)
>> I spent some time trying to understand how ELSA save the per-process
>> accounting data before the task_struct data structure gets disposed,
>> but failed to find anything. My assumption would be that ELSA does
>> not collection those data in the kernel itself? Instead, it would
>> read the pacct file created by either BSD or CSA?
>
> Yes you're right, ELSA reads accounting file created by BSD or CSA. We
> don't make accounting. I think that the communication problem is here
Guilluame's reply should answer your question. ELSA does not collect
accounting data in the kernel as BSD/CSA does. It uses accounting
data collected by BSD/CSA.
The exit hook is essential for CSA to save off data before the data
is gone, A netlink type of thing does not help. BSD is in the same
situation. You can not replace the acct_process() call with a netlink.
If ELSA is to use the enhanced accounting data, it needs the CSA
eop handling at exit as well.
Thanks,
- jay
Guillaume Thouvenin wrote:
> On Thu, 2005-02-24 at 20:46 -0800, Andrew Morton wrote:
>
>>Jay Lan <jlan@sgi.com> wrote:
>>
>>>Since my idea of providing an accounting framework was considered
>>> 'overkill', here i submit a tiny patch just to allow CSA to
>>> handle end-of-process (eop) situation by saving off accounting
>>> data before a task_struct is disposed.
>>>
>>> This patch is to modify the acct_process() in acct.c, which is
>>> invoked from do_exit() to handle eop for BSD accounting. Now
>>> the acct_process() wrapper will also take care of CSA, if it has
>>> been loaded. If the CSA module has been loaded, a CSA routine
>>> will be invoked to construct a CSA job record and to write the
>>> record to the CSA accounting file.
>>
>>I really don't want to have to (and shouldn't need to) become an accounting
>>person, but as there seems to be a communication problem somewhere..
>>
>>Please, you guys are the subject matter experts. Put your heads together
>>and come up with something.
>
>
> I completely agree with that and we will continue this conversation in
> private with Jay and all people involved to come up with an appropriate
> solution.
>
> Guillaume
next prev parent reply other threads:[~2005-02-28 19:06 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-25 4:26 [PATCH 2.6.11-rc4-mm1] end-of-proces handling for acct-csa Jay Lan
2005-02-25 4:46 ` Andrew Morton
2005-02-25 6:57 ` Guillaume Thouvenin
2005-02-28 18:56 ` Jay Lan [this message]
2005-03-01 7:33 ` Guillaume Thouvenin
2005-03-01 18:06 ` Jay Lan
2005-03-02 7:48 ` Guillaume Thouvenin
2005-03-02 17:56 ` Jesse Barnes
2005-03-02 17:59 ` Jay Lan
2005-03-05 6:29 ` Tim Schmielau
2005-03-07 23:57 ` Jay Lan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=42236979.5030702@sgi.com \
--to=jlan@sgi.com \
--cc=akpm@osdl.org \
--cc=guillaume.thouvenin@bull.net \
--cc=jbarnes@sgi.com \
--cc=kaigai@ak.jp.nec.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tim@physik3.uni-rostock.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox