9front - general discussion about 9front
 help / color / mirror / Atom feed
From: ori@eigenstate.org
To: morrow.stuart@gmail.com
To: 9front@9front.org
Subject: Re: [9front] VMX improvements + AVX
Date: Thu, 10 Dec 2020 07:09:40 -0800	[thread overview]
Message-ID: <947D1941865408CA69F8862DDDE99453@eigenstate.org> (raw)
In-Reply-To: <CABB-WO_7T7SwaQhvnn9YYe8PiW2-=8GmFKzoJj74U6gJFeJBvQ@mail.gmail.com>

Quoth Stuart Morrow <morrow.stuart@gmail.com>:
> I have to admit I don't understand why this type of thing actually
> needs to be a patch. The kernel needs to know what instructions the
> program is liable to use? Why? My Nemo's-book understanding of this
> stuff: the kernel sets up an allotment of time, and then the user
> process goes to town within the constraints set up for it. Can't
> really imagine why certain instructions would need special
> arrangements or what the mechanism might be.

A process is a collection of registers, memory, and file descriptors
(mostly). So, switching processes means that you need to swap out the
active resources.

AVX adds more registers, so there are new things that need to be
swapped. That means two things:

0) the kernel needs to know that these registers exist, so that it
   can save them and restore them when switching procs.
1) it's not on automatically, and userspace can't turn it on,
   because if the kernel didn't know how to save them across
   processes, one process would step all over the others new
   registers.

(usually) new instructions that don't add new registers need no
work in the OS.

  reply	other threads:[~2020-12-10 15:15 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-04 15:39 Sigrid Solveig Haflínudóttir
2020-12-04 21:15 ` james palmer
2020-12-04 22:25 ` Kurt H Maier
2020-12-05  0:19 ` ori
2020-12-10 12:23 ` Stuart Morrow
2020-12-10 15:09   ` ori [this message]
2020-12-18  2:22   ` magma698hfsp273p9f
2020-12-18  4:41     ` ori
2021-01-21  0:58       ` Nemo's books (WAS: Re: [9front] VMX improvements + AVX) magma698hfsp273p9f
2021-01-21  3:37         ` Roman Shaposhnik
2021-01-21  3:58         ` sl
2021-01-23  7:31           ` [9front] Re: Nemo's books magma698hfsp273p9f
2021-01-23 12:47             ` Eckard Brauer
2021-01-21  4:07         ` Nemo's books (WAS: Re: [9front] VMX improvements + AVX) Anthony Martin

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=947D1941865408CA69F8862DDDE99453@eigenstate.org \
    --to=ori@eigenstate.org \
    --cc=9front@9front.org \
    --cc=morrow.stuart@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).