public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <ak@suse.de>
To: Davide Libenzi <davidel@xmailserver.org>
Cc: linux-kernel@vger.kernel.org, akpm@osdl.org, torvalds@osdl.org
Subject: Re: [patch] lazy TSS's I/O bitmap copy ...
Date: Mon, 23 Aug 2004 23:32:49 +0200	[thread overview]
Message-ID: <20040823233249.09e93b86.ak@suse.de> (raw)
In-Reply-To: <Pine.LNX.4.58.0408231311460.3221@bigblue.dev.mdolabs.com>

On Mon, 23 Aug 2004 14:23:35 -0700 (PDT)
Davide Libenzi <davidel@xmailserver.org> wrote:

> 
> The following patch implements a lazy I/O bitmap copy for the i386 
> architecture. With I/O bitmaps now reaching considerable sizes, if the 
> switched task does not perform any I/O operation, we can save the copy 
> altogether. In my box X is working fine with the following patch, even if 
> more test would be required.

IMHO this needs benchmarks first to prove that the additional 
exception doesn't cause too much slow down.

>  asmlinkage void do_general_protection(struct pt_regs * regs, long error_code)
>  {
> +	int cpu = smp_processor_id();
> +	struct tss_struct *tss = init_tss + cpu;
> +	struct task_struct *tsk = current;
> +	struct thread_struct *tsk_th = &tsk->thread;
> +
> +	/*
> +	 * Perform the lazy TSS's I/O bitmap copy. If the TSS has an
> +	 * invalid offset set (the LAZY one) and the faulting thread has
> +	 * a valid I/O bitmap pointer, we copy the I/O bitmap in the TSS
> +	 * and we set the offset field correctly. Then we let the CPU to
> +	 * restart the faulting instruction.
> +	 */

I don't like it very much that most GPFs will be executed twice now
when the process has ioperm enabled.
This will confuse debuggers and could have other bad side effects.
Checking the EIP would be better.

-Andi

  reply	other threads:[~2004-08-23 21:41 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-23 21:23 [patch] lazy TSS's I/O bitmap copy Davide Libenzi
2004-08-23 21:32 ` Andi Kleen [this message]
2004-08-23 21:39   ` Davide Libenzi
2004-08-23 22:07     ` Linus Torvalds
2004-08-23 22:18       ` Davide Libenzi
2004-08-23 22:27         ` Linus Torvalds
2004-08-28 19:15         ` Alan Cox
2004-08-23 22:54       ` Davide Libenzi
2004-08-23 23:09         ` Linus Torvalds
2004-08-23 23:33           ` Davide Libenzi
2004-08-24  7:19     ` [patch] ioport-cache-2.6.8.1.patch Ingo Molnar
2004-08-24 15:15       ` Davide Libenzi
2004-08-24 19:38       ` Ryan Cumming
2004-08-24 20:20         ` Ingo Molnar
2004-08-24  1:53 ` [patch] lazy TSS's I/O bitmap copy Brian Gerst
2004-08-24  2:17   ` Linus Torvalds
2004-08-24  4:30   ` Davide Libenzi
2004-08-24  6:51 ` Arjan van de Ven
2004-08-24 15:13   ` Davide Libenzi

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=20040823233249.09e93b86.ak@suse.de \
    --to=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=davidel@xmailserver.org \
    --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