mirror of
https://github.com/jorisvink/kore
synced 2025-03-09 04:29:02 -04:00
Move CPU pinning to kore_worker_started().
When trying to pin a worker to a certain CPU, Kore will log if it fails but still continue. The problem is that it tried to do it a bit early and the logging facilities were not yet setup, causing it to be unable to continue if kore_log() was called too early. By moving it to kore_worker_started() we are certain all facilities are up and running correctly.
This commit is contained in:
parent
66e893f1d4
commit
21f466c8b6
@ -450,9 +450,6 @@ kore_worker_entry(struct kore_worker *kw)
|
|||||||
|
|
||||||
kore_platform_proctitle(kore_worker_name(kw->id));
|
kore_platform_proctitle(kore_worker_name(kw->id));
|
||||||
|
|
||||||
if (worker_set_affinity == 1)
|
|
||||||
kore_platform_worker_setcpu(kw);
|
|
||||||
|
|
||||||
kore_pid = kw->pid;
|
kore_pid = kw->pid;
|
||||||
kore_signal_setup();
|
kore_signal_setup();
|
||||||
|
|
||||||
@ -752,6 +749,9 @@ kore_worker_started(void)
|
|||||||
{
|
{
|
||||||
const char *chroot;
|
const char *chroot;
|
||||||
|
|
||||||
|
if (worker_set_affinity == 1)
|
||||||
|
kore_platform_worker_setcpu(worker);
|
||||||
|
|
||||||
if (worker->ps->skip_chroot)
|
if (worker->ps->skip_chroot)
|
||||||
chroot = "root";
|
chroot = "root";
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user