From: Chuck Ebbert <76306.1226@compuserve.com>
To: Stephane Eranian <eranian@hpl.hp.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
Linus Torvalds <torvalds@osdl.org>, Andi Kleen <ak@suse.de>
Subject: Re: [PATCH] i386 TIF flags for debug regs and io bitmap in ctxsw (v2)
Date: Tue, 25 Jul 2006 15:19:49 -0400 [thread overview]
Message-ID: <200607251522_MC3-1-C616-70EB@compuserve.com> (raw)
In-Reply-To: <20060725055439.GA18053@frankl.hpl.hp.com>
On Mon, 24 Jul 2006 22:54:39 -0700, Stephane Eranian wrote:
>
> I would like to follow-up the TIF flags and especially on the
> rules of inheritance. It appears the TIF flags are copied from
> parent to child task systematically on copy_process.
> Then they are adjusted in copy_threads() or sub-functions.
>
> The TIF_IO_BITMAP is checked in copy_threads() with the following code:
>
> int copy_thread(int nr, unsigned long clone_flags, unsigned long esp,
> unsigned long unused,
> struct task_struct * p, struct pt_regs * regs)
> {
> ....
> if (unlikely(test_tsk_thread_flag(tsk, TIF_IO_BITMAP))) {
> p->thread.io_bitmap_ptr = kmalloc(IO_BITMAP_BYTES, GFP_KERNEL);
> if (!p->thread.io_bitmap_ptr) {
> p->thread.io_bitmap_max = 0;
> return -ENOMEM;
> }
> memcpy(p->thread.io_bitmap_ptr, tsk->thread.io_bitmap_ptr,
> IO_BITMAP_BYTES);
> set_tsk_thread_flag(p, TIF_IO_BITMAP);
> }
>
> I would think that the set_tsk_thread_flag() is extraneous.
>
Yeah. But harmless.
> As for TIF_DEBUG, my patch is not clearing it. I don't think you can
> have HW breakpoints be inherited from one task to the other.
Looks like the debug regs get copied on fork and only cleared on exec
in flush_thread(). So this should be OK. Please doublecheck.
(The new TIF_DEBUG flag went into 2.8.18-rc, in case you didn't notice.)
--
Chuck
next reply other threads:[~2006-07-25 19:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-25 19:19 Chuck Ebbert [this message]
2006-07-25 20:18 ` Stephane Eranian
-- strict thread matches above, loose matches on Subject: below --
2006-07-04 7:29 [PATCH 2/2] i386 TIF flags for debug regs and io bitmap in ctxsw Stephane Eranian
2006-07-05 11:54 ` [PATCH] i386 TIF flags for debug regs and io bitmap in ctxsw (v2) Stephane Eranian
2006-07-25 5:54 ` Stephane Eranian
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=200607251522_MC3-1-C616-70EB@compuserve.com \
--to=76306.1226@compuserve.com \
--cc=ak@suse.de \
--cc=eranian@hpl.hp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
/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
Powered by JetHome