On 1/19/22 11:30, Jinoh Kang wrote:
As you can see this inevitably winds up tweaking the select mechanism anyway. This approach has some open questions:
How shell we return the results for our new pseudo-APC call? Using prev_apc in the select request, or a separate server call?
Shall our pseudo-APC go through the system_apc queue? If so, what if there is another kernel APC that is already queued?
Shall we reuse invoke_system_apc() for this apc_call_t response?
Shall we reuse queue_apc() to generate the apc_call_t? If so, what shall be done with the gratuitous SIGUSR1 delivery? Enter uninterrupted region or explicitly block SIGUSR1 while calling receive_sock?
Further remarks:
- If we lean toward "don't reuse anything," we're left with a bunch of APC bureaucracies with no apparent merits. - If we lean toward "reuse as much as possible," we would be left with some nontrivial refactoring work to do regarding select calls (e.g. injecting prev_apc to server_select/server_wait, special casing the "synchronous APC").