Message ID | 1464615434-29333-1-git-send-email-maxim.uvarov@linaro.org |
---|---|
State | Superseded |
Headers | show |
On 05/30/16 16:53, Savolainen, Petri (Nokia - FI/Espoo) wrote: > >> -----Original Message----- >> From: Maxim Uvarov [mailto:maxim.uvarov@linaro.org] >> Sent: Monday, May 30, 2016 4:37 PM >> To: lng-odp@lists.linaro.org >> Cc: Maxim Uvarov <maxim.uvarov@linaro.org>; Savolainen, Petri (Nokia - >> FI/Espoo) <petri.savolainen@nokia.com> >> Subject: [PATCH] linux-generic: sched: do not allocate sheduler info in >> shm area >> >> Patch: >> 637a482 linux-generic: schedule: clean interface towards pktio >> Broke ipc pktio work. Restore this chunk back. Idea here the following >> that 2 processes roll in the same name space instance and should not >> overlap each other shared memory files. There is no reason in putting >> sheduler internal structures to shared memory. >> >> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> >> Cc: Petri Savolainen <petri.savolainen@nokia.com> >> --- >> platform/linux-generic/odp_schedule.c | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/platform/linux-generic/odp_schedule.c b/platform/linux- >> generic/odp_schedule.c >> index 1adc545..78fe9a7 100644 >> --- a/platform/linux-generic/odp_schedule.c >> +++ b/platform/linux-generic/odp_schedule.c >> @@ -22,6 +22,7 @@ >> #include <odp/api/cpu.h> >> >> #include <odp_queue_internal.h> >> +#include <odp_packet_io_internal.h> > > The idea is to get rid-off all internal / hidden interfaces between the scheduler and rest of the system. Addition of IPC pktio should not require scheduler to use a special pool create function for its internal command pool (which is not linked to any pktio). > > IPC pktio should touch only IPC related pool creation - not all pool creations of the system. > > -Petri > I will try to think how to do this in more clean way. If it will take some time I just revert your patch or apply this one. I really want back all CI in working state. Maxim.
On 05/30/16 17:16, Maxim Uvarov wrote: > On 05/30/16 16:53, Savolainen, Petri (Nokia - FI/Espoo) wrote: >> >>> -----Original Message----- >>> From: Maxim Uvarov [mailto:maxim.uvarov@linaro.org] >>> Sent: Monday, May 30, 2016 4:37 PM >>> To: lng-odp@lists.linaro.org >>> Cc: Maxim Uvarov <maxim.uvarov@linaro.org>; Savolainen, Petri (Nokia - >>> FI/Espoo) <petri.savolainen@nokia.com> >>> Subject: [PATCH] linux-generic: sched: do not allocate sheduler info in >>> shm area >>> >>> Patch: >>> 637a482 linux-generic: schedule: clean interface towards pktio >>> Broke ipc pktio work. Restore this chunk back. Idea here the following >>> that 2 processes roll in the same name space instance and should not >>> overlap each other shared memory files. There is no reason in putting >>> sheduler internal structures to shared memory. >>> >>> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> >>> Cc: Petri Savolainen <petri.savolainen@nokia.com> >>> --- >>> platform/linux-generic/odp_schedule.c | 3 ++- >>> 1 file changed, 2 insertions(+), 1 deletion(-) >>> >>> diff --git a/platform/linux-generic/odp_schedule.c b/platform/linux- >>> generic/odp_schedule.c >>> index 1adc545..78fe9a7 100644 >>> --- a/platform/linux-generic/odp_schedule.c >>> +++ b/platform/linux-generic/odp_schedule.c >>> @@ -22,6 +22,7 @@ >>> #include <odp/api/cpu.h> >>> >>> #include <odp_queue_internal.h> >>> +#include <odp_packet_io_internal.h> >> >> The idea is to get rid-off all internal / hidden interfaces between >> the scheduler and rest of the system. Addition of IPC pktio should >> not require scheduler to use a special pool create function for its >> internal command pool (which is not linked to any pktio). >> >> IPC pktio should touch only IPC related pool creation - not all pool >> creations of the system. >> >> -Petri >> > I will try to think how to do this in more clean way. If it will take > some time I just revert your patch or apply this one. I really want > back all CI in working state. > > Maxim. Petri, can you please explain why scheduler pool has to be in the same memory for all odp processes with same instance id? Do you want odp_schedule() to schedule events between 2 instances? If you than second process has to do loop up for schedule pool created by first process and correctly attach to it. Maxim.
diff --git a/platform/linux-generic/odp_schedule.c b/platform/linux-generic/odp_schedule.c index 1adc545..78fe9a7 100644 --- a/platform/linux-generic/odp_schedule.c +++ b/platform/linux-generic/odp_schedule.c @@ -22,6 +22,7 @@ #include <odp/api/cpu.h> #include <odp_queue_internal.h> +#include <odp_packet_io_internal.h> odp_thrmask_t sched_mask_all; @@ -165,7 +166,7 @@ int odp_schedule_init_global(void) params.buf.num = NUM_SCHED_CMD; params.type = ODP_POOL_BUFFER; - pool = odp_pool_create("odp_sched_pool", ¶ms); + pool = _pool_create("odp_sched_pool", ¶ms, 0); if (pool == ODP_POOL_INVALID) { ODP_ERR("Schedule init: Pool create failed.\n"); return -1;
Patch: 637a482 linux-generic: schedule: clean interface towards pktio Broke ipc pktio work. Restore this chunk back. Idea here the following that 2 processes roll in the same name space instance and should not overlap each other shared memory files. There is no reason in putting sheduler internal structures to shared memory. Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Cc: Petri Savolainen <petri.savolainen@nokia.com> --- platform/linux-generic/odp_schedule.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)