public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Bodo Stroesser <bstroesser@fujitsu-siemens.com>
To: blaisorblade@yahoo.it
Cc: akpm@osdl.org, jdike@addtoit.com, linux-kernel@vger.kernel.org,
	user-mode-linux-devel@lists.sourceforge.net
Subject: Re: [uml-devel] [patch 02/12] uml: cpu_relax fix
Date: Wed, 23 Mar 2005 18:09:20 +0100	[thread overview]
Message-ID: <4241A2C0.2050206@fujitsu-siemens.com> (raw)
In-Reply-To: <20050322162121.4295D2125C@zion>

blaisorblade@yahoo.it wrote:
> Use rep_nop instead of barrier for cpu_relax, following $(SUBARCH)'s doing
> that (i.e. i386 and x86_64).

IIRC, Jeff had the idea, to use sched_yield() for this (from a discussion on #uml).
S390 does something similar using a special DIAG-opcode that gives permission to zVM,
that another Guest might run.

On a host running many UMLs, this might improve performance.

So, I would like to have the small patch below (it's not tested, just an idea).

		Bodo


> diff -puN include/asm-um/processor-generic.h~uml-cpu_relax include/asm-um/processor-generic.h
> --- linux-2.6.11/include/asm-um/processor-generic.h~uml-cpu_relax	2005-03-22 16:52:25.000000000 +0100
> +++ linux-2.6.11-paolo/include/asm-um/processor-generic.h	2005-03-22 16:54:41.000000000 +0100
> @@ -16,7 +16,8 @@ struct task_struct;
>  
>  struct mm_struct;
>  
> -#define cpu_relax()   barrier()
> +#include "kern.h"
> +#define cpu_relax()   sched_yield()
>  
>  struct thread_struct {
>  	int forking;

  reply	other threads:[~2005-03-23 17:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-22 16:21 [patch 02/12] uml: cpu_relax fix blaisorblade
2005-03-23 17:09 ` Bodo Stroesser [this message]
2005-03-24  1:50   ` [uml-devel] " Blaisorblade
2005-03-24  2:02     ` Andrew Morton
2005-03-24  2:09     ` Nick Piggin

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=4241A2C0.2050206@fujitsu-siemens.com \
    --to=bstroesser@fujitsu-siemens.com \
    --cc=akpm@osdl.org \
    --cc=blaisorblade@yahoo.it \
    --cc=jdike@addtoit.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    /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