DosSetPriority (PRTYC_FOREGROUNDSERVER) really needed for wpa_supplicant?

6 views
Skip to first unread message

Andi B.

unread,
Nov 17, 2018, 10:53:56 AM11/17/18
to
In wpa_supplicant code I see -

// increas priority to keep the key exchange alive
DosSetPriority( PRTYS_PROCESS, PRTYC_FOREGROUNDSERVER , 0, ppib->pib_ulpid);

I remember various discussions about priority settings in different groups and I wonder if
this is really needed for wpa_supplicant. Guess no. But this setting is in the code since
ages. And the comment seems to indicate that there is/was a problem otherwise.

Of course I can change this value or leave it at regular and test. But handshake with
access point and time to establish a connection depends on so much other things I fear
testing with different machines takes forever.

Comments please. Steven?

Regards, Andreas

Steven Levine

unread,
Nov 23, 2018, 1:54:04 AM11/23/18
to
On Sat, 17 Nov 2018 15:53:55 UTC, "Andi B." <and...@gmx.net> wrote:

Hi Andi,

> // increas priority to keep the key exchange alive
> DosSetPriority( PRTYS_PROCESS, PRTYC_FOREGROUNDSERVER , 0, ppib->pib_ulpid);

> I remember various discussions about priority settings in different groups and I wonder if
> this is really needed for wpa_supplicant. Guess no.

The usual answer is that it depends. If other compute bound threads
running at the same priority could chew up enough CPU time to cause
the app to fail, running the app at a higher priority can be a
solution.

I don't know what the timing requirements are for the key exchange
protocol. To my way of thinking, they would have to be rather small
to require running the supplicant at a high priority.

Steven


--
---------------------------------------------------------------------
Steven Levine <ste...@earthlink.bogus.net>
DIY/Warp/BlueLion etc. www.scoug.com www.arcanoae.com www.warpcave.com
---------------------------------------------------------------------

Herbert Rosenau

unread,
Nov 25, 2018, 12:30:00 PM11/25/18
to
On 23.11.18 07:53, Steven Levine wrote:
> On Sat, 17 Nov 2018 15:53:55 UTC, "Andi B." <and...@gmx.net> wrote:
>
> Hi Andi,
>
>> // increas priority to keep the key exchange alive
>> DosSetPriority( PRTYS_PROCESS, PRTYC_FOREGROUNDSERVER , 0, ppib->pib_ulpid);
>
>> I remember various discussions about priority settings in different groups and I wonder if
>> this is really needed for wpa_supplicant. Guess no.
>
> The usual answer is that it depends. If other compute bound threads
> running at the same priority could chew up enough CPU time to cause
> the app to fail, running the app at a higher priority can be a
> solution.
>
> I don't know what the timing requirements are for the key exchange
> protocol. To my way of thinking, they would have to be rather small
> to require running the supplicant at a high priority.
>
> Steven
>
>
The priority effects are higliy depends of the nuber of (virtual) cores
available to the (CPUs).

A single core runs mostenly only the threads with the same or higher
priority, leaving theads with lower mostenly alone.

Threads with lower priority than than others getting only time slices
when there are enough kernels exists than higher priore threads waiting
for CPU.

OS/2 is known ready for up to 256 cores.

Hyperthreading gives 2 virtual cores for each real one. So 2 threads on
an I3 up to intel generation 8 workking on the same time. With
generation 9 there are 4 threads in parallel.

The number of threads defined in a CPU gives mor lower prior threads
more time slices as an single core CPU can use.
Reply all
Reply to author
Forward
0 new messages