Deutsch English Français Italiano |
<vshv4h$c9jq$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: Robert Finch <robfi680@gmail.com> Newsgroups: comp.arch Subject: Re: Constant Stack Canaries Date: Tue, 1 Apr 2025 20:07:41 -0400 Organization: A noiseless patient Spider Lines: 37 Message-ID: <vshv4h$c9jq$1@dont-email.me> References: <vsbcnl$1d4m5$1@dont-email.me> <vsc058$20pih$1@dont-email.me> <4cf60b5fd8b785feb07a67a823cc349d@www.novabbs.org> <vseeen$l4ig$1@dont-email.me> <vseiq9$qndj$1@dont-email.me> <e05e9d429f71944bbfe74c3f54b79a03@www.novabbs.org> <vseojq$112f7$1@dont-email.me> <62b5c4a25d917c5bab64a815189de826@www.novabbs.org> <vsfrqk$28q7o$1@dont-email.me> <e979a6486749ef9ea55b25786e68eb50@www.novabbs.org> <vsho0k$3sqf$1@dont-email.me> <91e806bfd9ce542597dfe9092fe85706@www.novabbs.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Wed, 02 Apr 2025 02:07:46 +0200 (CEST) Injection-Info: dont-email.me; posting-host="b768bb7d8cfa4499887c5d2be887c6be"; logging-data="403066"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+zJoH5f89gsQWi70ccW2rhWQY3T5sSbCw=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:IVrAMXaFOJaOGa/ENkgKr1OxNLo= In-Reply-To: <91e806bfd9ce542597dfe9092fe85706@www.novabbs.org> Content-Language: en-US Bytes: 3255 On 2025-04-01 7:24 p.m., MitchAlsup1 wrote: > On Tue, 1 Apr 2025 22:06:10 +0000, Robert Finch wrote: > >> On 2025-04-01 2:51 p.m., MitchAlsup1 wrote: >>> On Tue, 1 Apr 2025 4:58:58 +0000, Robert Finch wrote: > ------------------ >>>> >>>> It is looking like the context switch code for the OS will take about >>>> 3000 clock cycles to run. >>> >>> How much of that is figuring out who to switch to and, now that that has >>> been decided, make the context switch manifest ?? >> >> That was just for the making the switch. I calculated based on the >> number of register loads and stores x2 and then times 13 clocks for >> memory access, plus a little bit of overhead for other instructions. > > Why is it not 13 cycles to get started and then each register is 1 one > cycle. > The CPU does not do pipe-lined burst loads. To load the cache line it is two independent loads. 256-bits at a time. Stores post to the bus, but I seem to remember having to space out the stores so the queue in the memory controller did not overflow. Needs more work. Stores should be faster, I think they are single cycle. But loads may be quite slow if things are not in the cache. I should really measure it. It may not be as bad I think. It is still 300 LOC, about 100 loads and stores each way. Lots of move instructions for regs that cannot be directly loaded or stored. And with CRs serializing the processor. But the processor should eat up all the moves fairly quickly. >> Deciding who to switch to may be another good chunk of time. But the >> system is using a hardware ready list, so the choice is just to pop >> (load) the top task id off the ready list. The guts of the switcher is >> only about 30 LOC, but it calls a couple of helper routines.