Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

No more blah, blah, blah! -- Kirk, "Miri", stardate 2713.6


tech / sci.electronics.design / Re: Max number concurrent page sizes

SubjectAuthor
* Max number concurrent page sizesDon Y
+- Re:Max number concurrent page sizesMartin Rid
`* Re: Max number concurrent page sizesDimiter_Popoff
 `* Re: Max number concurrent page sizesDon Y
  `* Re: Max number concurrent page sizesDimiter_Popoff
   `* Re: Max number concurrent page sizesDon Y
    `* Re: Max number concurrent page sizesDimiter_Popoff
     `- Re: Max number concurrent page sizesDon Y

1
Max number concurrent page sizes

<tl4qti$2k4j6$1@dont-email.me>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=110290&group=sci.electronics.design#110290

  copy link   Newsgroups: sci.electronics.design
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: blockedo...@foo.invalid (Don Y)
Newsgroups: sci.electronics.design
Subject: Max number concurrent page sizes
Date: Thu, 17 Nov 2022 01:20:59 -0700
Organization: A noiseless patient Spider
Lines: 11
Message-ID: <tl4qti$2k4j6$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 17 Nov 2022 08:21:07 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="e5f5c6f8963d1ead8d8580b225b3e042";
logging-data="2757222"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+EuEwwJD5RFUXKoFU8g+Sh"
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.2.2
Cancel-Lock: sha1:1D/3sYhs5Dq+oPEOa1A3YpcnJ88=
Content-Language: en-US
 by: Don Y - Thu, 17 Nov 2022 08:20 UTC

I've been canvassing processors to determine the maximum number
of concurrently active page sizes supported in the hardware.
Most common values are:
- 0 (boring processors :>)
- 1 (old school)
- 2 (modern common)
with, so far, a maximum of *7* supported.

Anyone know of current hardware that supports a greater number?
(PMMUs, only -- not interested in segmented architectures)

Re:Max number concurrent page sizes

<tl6448$2nb5a$1@dont-email.me>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=110335&group=sci.electronics.design#110335

  copy link   Newsgroups: sci.electronics.design
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: martin_r...@verison.net (Martin Rid)
Newsgroups: sci.electronics.design
Subject: Re:Max number concurrent page sizes
Date: Thu, 17 Nov 2022 15:04:22 -0500 (EST)
Organization: news.eternal-september.org
Lines: 11
Message-ID: <tl6448$2nb5a$1@dont-email.me>
References: <tl4qti$2k4j6$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 17 Nov 2022 20:04:24 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="91c29561582c84957bc09a32d11dae71";
logging-data="2862250"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18W+trupwQSiFFV2Kv7iIoh"
Cancel-Lock: sha1:GBPrXJj2VJMl8vXwNb55IyH8ubw=
X-Newsreader: PiaoHong.Usenet.Client.Free:2.02
 by: Martin Rid - Thu, 17 Nov 2022 20:04 UTC

Don Y <blockedofcourse@foo.invalid> Wrote in message:r
> I've been canvassing processors to determine the maximum numberof concurrently active page sizes supported in the hardware.Most common values are:- 0 (boring processors :>)- 1 (old school)- 2 (modern common)with, so far, a maximum of *7* supported.Anyone know of current hardware that supports a greater number?(PMMUs, only -- not interested in segmented architectures)

You should be getting ready for that lake effect snow.

;)
--

----Android NewsGroup Reader----
https://piaohong.s3-us-west-2.amazonaws.com/usenet/index.html

Re: Max number concurrent page sizes

<tl69ku$2np3o$1@dont-email.me>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=110353&group=sci.electronics.design#110353

  copy link   Newsgroups: sci.electronics.design
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: dp...@tgi-sci.com (Dimiter_Popoff)
Newsgroups: sci.electronics.design
Subject: Re: Max number concurrent page sizes
Date: Thu, 17 Nov 2022 23:38:39 +0200
Organization: TGI
Lines: 25
Message-ID: <tl69ku$2np3o$1@dont-email.me>
References: <tl4qti$2k4j6$1@dont-email.me>
Reply-To: dp@tgi-sci.com
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 17 Nov 2022 21:38:38 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="098d49adc3277a5a6ccbc0b9a77b8a89";
logging-data="2876536"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/nDK4GRtQCzo3kjx837jEG"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.4.2
Cancel-Lock: sha1:YRDzSQaS0ZWEHracTnZNqySh7ss=
In-Reply-To: <tl4qti$2k4j6$1@dont-email.me>
Content-Language: en-US
 by: Dimiter_Popoff - Thu, 17 Nov 2022 21:38 UTC

On 11/17/2022 10:20, Don Y wrote:
> I've been canvassing processors to determine the maximum number
> of concurrently active page sizes supported in the hardware.
> Most common values are:
> - 0 (boring processors :>)
> - 1 (old school)
> - 2 (modern common)
> with, so far, a maximum of *7* supported.
>
> Anyone know of current hardware that supports a greater number?
> (PMMUs, only -- not interested in segmented architectures)
>

Hi Don,
the 32 bit power cores I use support just 4k page size; however they
also have block address translation, which is quite a blessing (e.g.
some of the most vital OS code can be put into a block starting at
0, block size can get really huge, with the same protection bits
like pages, block having priority over pages it overlaps).
The 64 bit core I want to use does not have that but has a few page
sizes, I have yet to think it over how it will be (still finishing
that programming I told you about, have been finishing it for ages now,
latest target is end of this year :). At the moment I already miss
block address translation but I have not thought it in depth yet.

Re: Max number concurrent page sizes

<tl6mvr$2oq8u$1@dont-email.me>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=110371&group=sci.electronics.design#110371

  copy link   Newsgroups: sci.electronics.design
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: blockedo...@foo.invalid (Don Y)
Newsgroups: sci.electronics.design
Subject: Re: Max number concurrent page sizes
Date: Thu, 17 Nov 2022 18:26:11 -0700
Organization: A noiseless patient Spider
Lines: 43
Message-ID: <tl6mvr$2oq8u$1@dont-email.me>
References: <tl4qti$2k4j6$1@dont-email.me> <tl69ku$2np3o$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 18 Nov 2022 01:26:20 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="3860e8b987bcc6ae61b9e795a212a7a2";
logging-data="2910494"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX188RO7rT3fFRpz5o/P6QmZL"
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.2.2
Cancel-Lock: sha1:dUKP7UKiVNpKdwSjM7Vvq2nPiX4=
In-Reply-To: <tl69ku$2np3o$1@dont-email.me>
Content-Language: en-US
 by: Don Y - Fri, 18 Nov 2022 01:26 UTC

On 11/17/2022 2:38 PM, Dimiter_Popoff wrote:
> the 32 bit power cores I use support just 4k page size; however they

4K seems to be the most commonly supported size (where pages are
supported). Some of the ARMs had "tiny" page support but that
seems to be an obsolescent feature (?)

On the other end, you can find support for 2GB pages (WTF?).
This, of course, limits the uses of the MMU.

> also have block address translation, which is quite a blessing (e.g.
> some of the most vital OS code can be put into a block starting at
> 0, block size can get really huge, with the same protection bits
> like pages, block having priority over pages it overlaps).

Is there a more efficient addressing mode for pages residing
that low in memory (like "page 0" for the 68xx's?). I.e.,
what advantage for the "address translation" -- the *protection*
mechanisms obviously bring something to the party...

> The 64 bit core I want to use does not have that but has a few page
> sizes, I have yet to think it over how it will be (still finishing
> that programming I told you about, have been finishing it for ages now,
> latest target is end of this year :).

The good thing about targets is you can always MOVE THEM! :>

> At the moment I already miss
> block address translation but I have not thought it in depth yet.

With a PMMU, you should be able to relocate <whatever> to any address
range you like. There will be a cost, however, in the TLB lookups
(and cache misses, etc.)

But, I would assume your mapping is largely static? Set it once at
initialization and then forget?

You don't, for example, give each process its own (overlapping!) address
space org'ed at SOMEHEXCONSTANT?

I rely on the VMM system, heavily, at runtime. So, its hardware
implementation is of particular interest to me...

Re: Max number concurrent page sizes

<tl8ac7$2vabm$1@dont-email.me>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=110421&group=sci.electronics.design#110421

  copy link   Newsgroups: sci.electronics.design
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: dp...@tgi-sci.com (Dimiter_Popoff)
Newsgroups: sci.electronics.design
Subject: Re: Max number concurrent page sizes
Date: Fri, 18 Nov 2022 18:03:19 +0200
Organization: TGI
Lines: 92
Message-ID: <tl8ac7$2vabm$1@dont-email.me>
References: <tl4qti$2k4j6$1@dont-email.me> <tl69ku$2np3o$1@dont-email.me>
<tl6mvr$2oq8u$1@dont-email.me>
Reply-To: dp@tgi-sci.com
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 18 Nov 2022 16:03:19 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="90cd03364c33287c98b50b8a99783481";
logging-data="3123574"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/N6tozU4Ny/jrHYUHkEOH1"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.5.0
Cancel-Lock: sha1:WWXoXJx1vA6Hwsn0p7jQ/OYp4vM=
In-Reply-To: <tl6mvr$2oq8u$1@dont-email.me>
Content-Language: en-US
 by: Dimiter_Popoff - Fri, 18 Nov 2022 16:03 UTC

On 11/18/2022 3:26, Don Y wrote:
> On 11/17/2022 2:38 PM, Dimiter_Popoff wrote:
>> the 32 bit power cores I use support just 4k page size; however they
>
> 4K seems to be the most commonly supported size (where pages are
> supported).  Some of the ARMs had "tiny" page support but that
> seems to be an obsolescent feature (?)
>
> On the other end, you can find support for 2GB pages (WTF?).
> This, of course, limits the uses of the MMU.
>
>> also have block address translation, which is quite a blessing (e.g.
>> some of the most vital OS code can be put into a block starting at
>> 0, block size can get really huge, with the same protection bits
>> like pages, block having priority over pages it overlaps).
>
> Is there a more efficient addressing mode for pages residing
> that low in memory (like "page 0" for the 68xx's?).  I.e.,
> what advantage for the "address translation" -- the *protection*
> mechanisms obviously bring something to the party...

There is, the lowest 64k, for load/store. The people who did the
power architecture during the 80-s at IBM did something the rest
have yet to catch up with.

>
>> The 64 bit core I want to use does not have that but has a few page
>> sizes, I have yet to think it over how it will be (still finishing
>> that programming I told you about, have been finishing it for ages now,
>> latest target is end of this year :).
>
> The good thing about targets is you can always MOVE THEM!  :>

You can move them, I am not so sure it is a good thing though :).

>
>> At the moment I already miss
>> block address translation but I have not thought it in depth yet.
>
> With a PMMU, you should be able to relocate <whatever> to any address
> range you like.  There will be a cost, however, in the TLB lookups
> (and cache misses, etc.)

There are several BAT registers so you can have one or more regions
translated where there is no need to do tablewalks, this is very
convenient. It also has other implications, say for interrupt
latency. Place your interrupt handling code in a BAT translated
area (dps allows you that) and your interrupt code will never
cause a tablewalk etc.

>
> But, I would assume your mapping is largely static?  Set it once at
> initialization and then forget?

Not many things are static in dps, one of the first things it does
during boot is to process a file setup.syst, which can have a line
saying say
paging 30
This means you will have a 2^30 virtual memory space mapped into
the physical memory (e.g. 128M). All code is position independent
so each task is happy to reside anywhere in the 2G (up to 4G that one)
address space, it does get spawned with a system data section and
a user data section which can reside anywhere as well; from there
on a task can allocate for itself memory, optionally registered
in its history record buffer (so it will be deallocated upon task
kill). You can mark memory regions non-swappable (page translated,
BAT translated can never be swapped anyway).

>
> You don't, for example, give each process its own (overlapping!) address
> space org'ed at SOMEHEXCONSTANT?

Each process does have its own memory but *no overlapping*. I am
firmly against doing it, it buys you nothing except backward
compatibility to older systems you have - which I don't.
a 4G address space is adequate enough for a 32 bit machine,
and a 2^64 address space is more than enough for a 64 bit
machine so I see no need to allow tasks to reside on overlapping
addresses.
>
> I rely on the VMM system, heavily, at runtime.  So, its hardware
> implementation is of particular interest to me...
>

Well of course, this is one of the fundamentals. It has to allow
you to protect pages, allow/disallow access to BAT translated
areas (e.g. you may want to allow system code to be read/executed
in user mode but not written to, same or different for supervisor
mode etc., the power architecture provides for all that, don't know
about the rest. I remember some ARM cores would do caching based
on logical address which makes them useless for many purposes,
perhaps they have better ones nowadays).

Re: Max number concurrent page sizes

<tl9495$31oug$1@dont-email.me>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=110446&group=sci.electronics.design#110446

  copy link   Newsgroups: sci.electronics.design
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: blockedo...@foo.invalid (Don Y)
Newsgroups: sci.electronics.design
Subject: Re: Max number concurrent page sizes
Date: Fri, 18 Nov 2022 16:25:16 -0700
Organization: A noiseless patient Spider
Lines: 178
Message-ID: <tl9495$31oug$1@dont-email.me>
References: <tl4qti$2k4j6$1@dont-email.me> <tl69ku$2np3o$1@dont-email.me>
<tl6mvr$2oq8u$1@dont-email.me> <tl8ac7$2vabm$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 18 Nov 2022 23:25:26 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="142308cef935f2ee7287982eb4283fe8";
logging-data="3204048"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18mQSjRAF55IZ3wXaNT+pg1"
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.2.2
Cancel-Lock: sha1:7jdD/UqbCJIwaNRcFSSBr6tAQBg=
Content-Language: en-US
In-Reply-To: <tl8ac7$2vabm$1@dont-email.me>
 by: Don Y - Fri, 18 Nov 2022 23:25 UTC

On 11/18/2022 9:03 AM, Dimiter_Popoff wrote:
>> Is there a more efficient addressing mode for pages residing
>> that low in memory (like "page 0" for the 68xx's?).  I.e.,
>> what advantage for the "address translation" -- the *protection*
>> mechanisms obviously bring something to the party...
>
> There is, the lowest 64k, for load/store. The people who did the
> power architecture during the 80-s at IBM did something the rest
> have yet to catch up with.

The modern equivalent is the "base 4GB" (32b) space. :>

>>> The 64 bit core I want to use does not have that but has a few page
>>> sizes, I have yet to think it over how it will be (still finishing
>>> that programming I told you about, have been finishing it for ages now,
>>> latest target is end of this year :).
>>
>> The good thing about targets is you can always MOVE THEM!  :>
>
> You can move them, I am not so sure it is a good thing though :).

Depends on whether or not you ever want to be DONE! (or "late")

>>> At the moment I already miss
>>> block address translation but I have not thought it in depth yet.
>>
>> With a PMMU, you should be able to relocate <whatever> to any address
>> range you like.  There will be a cost, however, in the TLB lookups
>> (and cache misses, etc.)
>
> There are several BAT registers so you can have one or more regions
> translated where there is no need to do tablewalks, this is very
> convenient. It also has other implications, say for interrupt
> latency. Place your interrupt handling code in a BAT translated
> area (dps allows you that) and your interrupt code will never
> cause a tablewalk etc.

I wire down those TLB pages -- as well as the pages containing the code
and data.

>> But, I would assume your mapping is largely static?  Set it once at
>> initialization and then forget?
>
> Not many things are static in dps, one of the first things it does
> during boot is to process a file setup.syst, which can have a line
> saying say
> paging 30
> This means you will have a 2^30 virtual memory space mapped into
> the physical memory (e.g. 128M). All code is position independent
> so each task is happy to reside anywhere in the 2G (up to 4G that one)
> address space, it does get spawned with a system data section and
> a user data section which can reside anywhere as well; from there

But, they can't REALLY reside "anywhere" as you won't allow them to
conflict with previous allocations.

If you allow overlap, then they can truly reside "anywhere" (except
the kernel access points)

> on a task can allocate for itself memory, optionally registered
> in its history record buffer (so it will be deallocated upon task
> kill). You can mark memory regions non-swappable (page translated,
> BAT translated can never be swapped anyway).

But you don't use the VMM system to move data/objects between processes (?).
E.g., when I want to push a packet to a network address, the memory that
contains that packet EXITS my address space and ENTERS the address space
of the network process that will get it transported to the target.

So, I can scribble on that memory immediately after the call and not worry
about whether the original memory contents or the "scribbled" contents
will actually get transmitted. This lets me turn all calls into "by value"
instead of "by reference". WITHOUT incurring the copy cost.

[Imagine processing live video and passing frames of data from one
process ("image enhancement") to another ("scene analysis") and
another ("motion detection") and another ("capture") -- each process
independently acting at a rate appropriate to their responsibilities
and resources without worrying about some other process/bug stomping
on something "important".]

Likewise, I can accept an entire process address space from another
node and just drop it in place, without worrying about "if it will fit"
(in the context of previous allocations).

>> You don't, for example, give each process its own (overlapping!) address
>> space org'ed at SOMEHEXCONSTANT?
>
> Each process does have its own memory but *no overlapping*. I am
> firmly against doing it, it buys you nothing except backward
> compatibility to older systems you have - which I don't.
> a 4G address space is adequate enough for a 32 bit machine,
> and a 2^64 address space is more than enough for a 64 bit
> machine so I see no need to allow tasks to reside on overlapping
> addresses.

I've found the biggest advantage to be that I don't have to "bake in"
decisions at design/compile time. I.e., if you want to have disjoint
address spaces (neglecting the fact that you may want to share a single
code image in multiple processes), then you need some way of partitioning
the single address space, /a priori/. So, if you want to support 1000
processes, then you set aside 10 address bits to determine which-is-which.
Another one for the kernel/user distinction. Your 32b machine is now a
real-mode '286 (~20 bit addresses).

If you want to support multiple nodes -- processes from any of which can
be migrated ONTO your node -- then you need to set aside enough additional
address bits to allow for their non-overlapping address spaces (and, have
to ensure that each node KNOWS what portion of the SHARED, SINGLE address
space they can use for their processes). I.e., treat the "system" as having
a single, unified address space -- though physically distributed across
multiple devices.

[I already need 9 bits to identify a "node number" so we'll have set
aside 20 address bits, already (10 process, 1 user/kernel, 9 node).
A larger installation could easily use more bits to support a greater
number of nodes]

If you assume a page is 4K (12 bits), then you've exhausted all 32 of the bits
available -- and only support a single page per process! (note very effective
as a means of transferring memory contents between processes :> )

Also, partitioning the address space leaks information. If YOUR code,
executing at 0x03678xxx (process 678 on node 03), accesses a block of memory
at 0xNNPPPxxx (copied into YOUR local address space), then you know it
originated in process PPP on node NN. This is information you shouldn't
know or see (as, someday, an exploit may be discovered that plagues node
NN or some particular process PPP regardless of the node on which it resides)

E.g., I have a separate mechanism that prevents the system from migrating
certain processes to nodes that aren't PHYSICALLY secure (e.g., located
in places where they can be compromised). But, this is handled at
configuration time -- because it is site dependent. If a malevolent
process could identify when an exploitable process has been migrated
onto a vulnerable node, then security is silently compromised.

[If your system is closed and you -- or a trusted few -- are the sole
developers, then you don't have to worry about malevolent actors. OTOH,
if foreign software can be installed with the *intent* of adding value,
then you have to assume some of that software can be deliberately or
accidentally malevolent in its actions]

If you assume a process should be able to manipulate multiple *pages*
(as interfaces to other processes), then a process needs additional
addressing bits beyond those required to isolate a byte within *a*
page.

>> I rely on the VMM system, heavily, at runtime.  So, its hardware
>> implementation is of particular interest to me...
>
> Well of course, this is one of the fundamentals. It has to allow
> you to protect pages, allow/disallow access to BAT translated
> areas (e.g. you may want to allow system code to be read/executed
> in user mode but not written to, same or different for supervisor
> mode etc., the power architecture provides for all that, don't know
> about the rest. I remember some ARM cores would do caching based
> on logical address which makes them useless for many purposes,
> perhaps they have better ones nowadays).

Protecting memory is only a small part of the problem. That attempts
to prevent surreptitious/accidental "communication" between processes
(benevolent or malevolent).

But, you also need to be able to constrain *explicit* communication.
Should process X be able to talk to the network stack? More generally,
should it be able to talk to process Y?

And, if it can talk to a particular process, what should it be allowed
to say/request? There's likely no harm in letting an arbitrary process
check the health of the battery. But, probably not as trusting to
be that lax with allowing processes to disconnect the battery (and
interfere with charging or killing power).

As the hardware mechanisms are too crude to give that sort of fine-grained
access control (permission bits per function invocation?), you have to build
mechanisms to implement and enforce those features. Mechanisms are typically
active -- more *processes* (a "wider" PPP) to act as gatekeepers.


Click here to read the complete article
Re: Max number concurrent page sizes

<tl99q5$32516$1@dont-email.me>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=110455&group=sci.electronics.design#110455

  copy link   Newsgroups: sci.electronics.design
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: dp...@tgi-sci.com (Dimiter_Popoff)
Newsgroups: sci.electronics.design
Subject: Re: Max number concurrent page sizes
Date: Sat, 19 Nov 2022 02:59:49 +0200
Organization: TGI
Lines: 281
Message-ID: <tl99q5$32516$1@dont-email.me>
References: <tl4qti$2k4j6$1@dont-email.me> <tl69ku$2np3o$1@dont-email.me>
<tl6mvr$2oq8u$1@dont-email.me> <tl8ac7$2vabm$1@dont-email.me>
<tl9495$31oug$1@dont-email.me>
Reply-To: dp@tgi-sci.com
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 19 Nov 2022 00:59:49 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="88054e0557ab5fe27c8d83f1295acd87";
logging-data="3216422"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19ajmeEtUAKqjlnzjk0yxzf"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.5.0
Cancel-Lock: sha1:B1EDWOZwkcCCJtOfotjhsw/SvHQ=
In-Reply-To: <tl9495$31oug$1@dont-email.me>
Content-Language: en-US
 by: Dimiter_Popoff - Sat, 19 Nov 2022 00:59 UTC

On 11/19/2022 1:25, Don Y wrote:
> On 11/18/2022 9:03 AM, Dimiter_Popoff wrote:
>>> Is there a more efficient addressing mode for pages residing
>>> that low in memory (like "page 0" for the 68xx's?).  I.e.,
>>> what advantage for the "address translation" -- the *protection*
>>> mechanisms obviously bring something to the party...
>>
>> There is, the lowest 64k, for load/store. The people who did the
>> power architecture during the 80-s at IBM did something the rest
>> have yet to catch up with.
>
> The modern equivalent is the "base 4GB" (32b) space.  :>
>
>>>> The 64 bit core I want to use does not have that but has a few page
>>>> sizes, I have yet to think it over how it will be (still finishing
>>>> that programming I told you about, have been finishing it for ages now,
>>>> latest target is end of this year :).
>>>
>>> The good thing about targets is you can always MOVE THEM!  :>
>>
>> You can move them, I am not so sure it is a good thing though :).
>
> Depends on whether or not you ever want to be DONE!  (or "late")
>
>>>> At the moment I already miss
>>>> block address translation but I have not thought it in depth yet.
>>>
>>> With a PMMU, you should be able to relocate <whatever> to any address
>>> range you like.  There will be a cost, however, in the TLB lookups
>>> (and cache misses, etc.)
>>
>> There are several BAT registers so you can have one or more regions
>> translated where there is no need to do tablewalks, this is very
>> convenient. It also has other implications, say for interrupt
>> latency. Place your interrupt handling code in a BAT translated
>> area (dps allows you that) and your interrupt code will never
>> cause a tablewalk etc.
>
> I wire down those TLB pages -- as well as the pages containing the code
> and data.
>
>>> But, I would assume your mapping is largely static?  Set it once at
>>> initialization and then forget?
>>
>> Not many things are static in dps, one of the first things it does
>> during boot is to process a file setup.syst, which can have a line
>> saying say
>> paging 30
>> This means you will have a 2^30 virtual memory space mapped into
>> the physical memory (e.g. 128M). All code is position independent
>> so each task is happy to reside anywhere in the 2G (up to 4G that one)
>> address space, it does get spawned with a system data section and
>> a user data section which can reside anywhere as well; from there
>
> But, they can't REALLY reside "anywhere" as you won't allow them to
> conflict with previous allocations.

Well anywhere without overlapping already allocated regions of course.
Memory is allocated and deallocated all the time, the *first* call
I have written back in 1993 (or was it 1994) is "allcm$; the caller asks
for a number of bytes (32 bit number on 32 bit machines) and gets
in return an address where this memory starts and the actual amount
of memory allocated (which will be cluster aligned, useful to preserve
for subsequent deallocation of that piece). Ever since then allocation
proceeds doing worst fit so you will always have large contiguous
pieces to allocate from.

>
> If you allow overlap, then they can truly reside "anywhere" (except
> the kernel access points)
>
>> on a task can allocate for itself memory, optionally registered
>> in its history record buffer (so it will be deallocated upon task
>> kill). You can mark memory regions non-swappable (page translated,
>> BAT translated can never be swapped anyway).
>
> But you don't use the VMM system to move data/objects between processes
> (?).

No, but the address space being just one I can pass pointers quite
easily. Sending an IP packet via Ethernet goes without copying; it
can also be scattered in a number of pieces, this goes out without
copying, too.
Incoming packets are another matter; you can check how many bytes
you have available at a tcp connection and request all or a part
of that to be put at a certain address; the tcp stack gathers
these from the buffered packets - which can be in multiple Ethernet
pools, having arrived in any sequence etc. - and copies the data
where you want it to, releasing the buffers etc.

> E.g., when I want to push a packet to a network address, the memory that
> contains that packet EXITS my address space and ENTERS the address space
> of the network process that will get it transported to the target.
>
> So, I can scribble on that memory immediately after the call and not worry
> about whether the original memory contents or the "scribbled" contents
> will actually get transmitted.  This lets me turn all calls into "by value"
> instead of "by reference".  WITHOUT incurring the copy cost.

This is an interesting approach of course. I am not sure I follow
why it is necessary but obviously you must have had your reasons.

>
> [Imagine processing live video and passing frames of data from one
> process ("image enhancement") to another ("scene analysis") and
> another ("motion detection") and another ("capture") -- each process
> independently acting at a rate appropriate to their responsibilities
> and resources without worrying about some other process/bug stomping
> on something "important".]

Well on the way out I can do that without copying. Doing it on the way
in from Ethernet without copying, just handing the scattered data as it
came in packets to the processing code seems of little value to me,
you must be collecting the data in some way which involves copying
as IP packets are of arbitrary length and don't come page aligned.

>
> Likewise, I can accept an entire process address space from another
> node and just drop it in place, without worrying about "if it will fit"
> (in the context of previous allocations).
>
>>> You don't, for example, give each process its own (overlapping!) address
>>> space org'ed at SOMEHEXCONSTANT?

Each process has also a "common" data section, in fact what you call a
process I call a task and I call a process the group of tasks sharing
that common section. It is allocated - and can happen to come anywhere,
cluster aligned etc. - upon the first task of the group (I am phasing
out the "process" term for the group for nearly 30 years now...).
>>
>> Each process does have its own memory but *no overlapping*. I am
>> firmly against doing it, it buys you nothing except backward
>> compatibility to older systems you have - which I don't.
>> a 4G address space is adequate enough for a 32 bit machine,
>> and a 2^64 address space is more than enough for a 64 bit
>> machine so I see no need to allow tasks to reside on overlapping
>> addresses.
>
> I've found the biggest advantage to be that I don't have to "bake in"
> decisions at design/compile time.  I.e., if you want to have disjoint
> address spaces (neglecting the fact that you may want to share a single
> code image in multiple processes),

But neglecting the ability to run the same program module (each task
has at least one program module, with a system maintained module
descriptor etc.) is not acceptable at all for me. While you can
define a module as being non-reentrant I have never written one.
E.g. you can have 10 shell instances, each run off the same module
(the OS keeps track which file it was loaded from, if you run
another file of the same name it will get a new module) and allocated
just the user and system data sections; there is also the initialized
data section, which can be part of the file from which the module
is loaded, if it is there is is also loaded (in the user data section).

> then you need some way of partitioning
> the single address space, /a priori/.  So, if you want to support 1000
> processes, then you set aside 10 address bits to determine which-is-which.
> Another one for the kernel/user distinction.  Your 32b machine is now a
> real-mode '286 (~20 bit addresses).

It does not work like that in dps. You have a list of task descriptors,
each containing the program module ID, user stack, system stack, many
other data.
Where these are allocated is immaterial to the code, it just uses
the addresses it has been given at run time.
The address space is divided into clusters - 4k per cluster at the
moment, it is a bitmap for the entire memory - so you don't have
to think about dividing the address space etc. It is all there,
the OS makes sure it is not fragmented by doing worst fit.
I can't see how this can be improved on, to be honest.


Click here to read the complete article
Re: Max number concurrent page sizes

<tl9toq$3670f$1@dont-email.me>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=110469&group=sci.electronics.design#110469

  copy link   Newsgroups: sci.electronics.design
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: blockedo...@foo.invalid (Don Y)
Newsgroups: sci.electronics.design
Subject: Re: Max number concurrent page sizes
Date: Fri, 18 Nov 2022 23:40:16 -0700
Organization: A noiseless patient Spider
Lines: 4
Message-ID: <tl9toq$3670f$1@dont-email.me>
References: <tl4qti$2k4j6$1@dont-email.me> <tl69ku$2np3o$1@dont-email.me>
<tl6mvr$2oq8u$1@dont-email.me> <tl8ac7$2vabm$1@dont-email.me>
<tl9495$31oug$1@dont-email.me> <tl99q5$32516$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 19 Nov 2022 06:40:27 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="142308cef935f2ee7287982eb4283fe8";
logging-data="3349519"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18rzjJnap/IhXGirsU37Mln"
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.2.2
Cancel-Lock: sha1:Kt1aImjM33/hznOEGB7Q6wU7ga0=
Content-Language: en-US
In-Reply-To: <tl99q5$32516$1@dont-email.me>
 by: Don Y - Sat, 19 Nov 2022 06:40 UTC

On 11/18/2022 5:59 PM, Dimiter_Popoff wrote:

Check your mail...

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor