Re: How to parallelization

2024-12-26 Thread Geoff Steckel
On Dec 23 14:55:30,c...@schulte.it wrote: things. I am searching for some kind of system API allowing an application to reserve a certain amount of CPUs exclusively - not shared with any other application - maybe not even the OS. Let's back off before blaming the OS or declaring CPU affinity to

Re: How to parallelization

2024-12-26 Thread jslee
On Fri, 27 Dec 2024, at 05:12, Anon Loli wrote: > This is all, granted, me not understanding how CPU and other resource's > scheduling works in general, and/or in OpenBSD, but this to me seems to be the > most sane thing. > Is manual resource dividing even possible in OS-s, and another question - i

Re: How to parallelization

2024-12-26 Thread Anon Loli
On Mon, Dec 23, 2024 at 05:03:10PM +0100, Jan Stary wrote: > On Dec 23 14:55:30, c...@schulte.it wrote: > > things. I am searching for some kind of system API allowing an > > application to reserve a certain amount of CPUs exclusively - not shared > > with any other application - maybe not even the

Re: How to parallelization

2024-12-25 Thread Christian Schulte
On 12/23/24 22:23, Geoff Steckel wrote: > On 12/23/24 1:43 PM, Christian Schulte wrote: >> Not criticizing OpenBSD in any way. Let me try to explain a common use >> case. There is a data source capable of providing X bytes per second at >> max. The application needs to be setup in a way it can rece

Re: How to parallelization

2024-12-23 Thread Geoff Steckel
On 12/23/24 1:43 PM, Christian Schulte wrote: Not criticizing OpenBSD in any way. Let me try to explain a common use case. There is a data source capable of providing X bytes per second at max. The application needs to be setup in a way it can receive those X bytes per second without spin locking

Re: How to parallelization

2024-12-23 Thread Christian Schulte
On 12/23/24 19:43, Christian Schulte wrote: > On 12/23/24 17:37, Geoff Steckel wrote: >> On 12/23/24 11:20 AM, Gábor LENCSE wrote: >>> Under Linux, one can use the isolcpus kernel command line >>> parameter to exclude certain cores from the scheduler. >>> I use the DPDK rte_eal_remote_launch() func

Re: How to parallelization

2024-12-23 Thread Allan Streib
If you need a "guarantee" to be able to process X bytes/second I think you need a real-time OS not a general purpose one.

Re: How to parallelization

2024-12-23 Thread Christian Schulte
On 12/23/24 17:37, Geoff Steckel wrote: > On 12/23/24 11:20 AM, Gábor LENCSE wrote: >> Under Linux, one can use the isolcpus kernel command line >> parameter to exclude certain cores from the scheduler. >> I use the DPDK rte_eal_remote_launch() function to start a thread on >> an isolated CPU core.

Re: How to parallelization

2024-12-23 Thread Gábor LENCSE
Hi Geoff, 23/12/2024 17:37 keltezéssel, Geoff Steckel írta: On 12/23/24 11:20 AM, Gábor LENCSE wrote: Under Linux, one can use the isolcpus kernel command line parameter to exclude certain cores from the scheduler. I use the DPDK rte_eal_remote_launch() function to start a thread on an isolate

Re: How to parallelization

2024-12-23 Thread Christian Schulte
On 12/23/24 17:03, Jan Stary wrote: > On Dec 23 14:55:30, c...@schulte.it wrote: >> things. I am searching for some kind of system API allowing an >> application to reserve a certain amount of CPUs exclusively - not shared >> with any other application - maybe not even the OS. > > If that existed,

Re: How to parallelization

2024-12-23 Thread Geoff Steckel
On 12/23/24 11:20 AM, Gábor LENCSE wrote: Under Linux, one can use the isolcpus kernel command line parameter to exclude certain cores from the scheduler. I use the DPDK rte_eal_remote_launch() function to start a thread on an isolated CPU core. Is there anything similar under OpenBSD? Is th

Re: How to parallelization

2024-12-23 Thread Gábor LENCSE
23/12/2024 17:03 keltezéssel, Jan Stary írta: On Dec 23 14:55:30, c...@schulte.it wrote: things. I am searching for some kind of system API allowing an application to reserve a certain amount of CPUs exclusively - not shared with any other application - maybe not even the OS. If that existed

Re: How to parallelization

2024-12-23 Thread Jan Stary
On Dec 23 14:55:30, c...@schulte.it wrote: > things. I am searching for some kind of system API allowing an > application to reserve a certain amount of CPUs exclusively - not shared > with any other application - maybe not even the OS. If that existed, every application would start with "reserve

Re: How to parallelization

2024-12-23 Thread Stuart Henderson
On 2024-12-23, Christian Schulte wrote: > Is there some standard API (e.g. POSIX) allowing an > application to reserve a certain amount of processors to a specific > application? Nothing standard afaik. There are non-standard APIs to set cpu affinity etc on some OS, but not on OpenBSD.

How to parallelization

2024-12-23 Thread Christian Schulte
Hello everybody, as a long time (decades) Java developer now converting to bare metal C, I would like to ask about how to do parallelization properly. The poor man's approach the Java APIs implement pretty much resemble what every one else is doing. Take the number of processors available in a sys