Lima doesn't work well with several contexts created
If we have two processes running lima, one of the process can hog all the GPU time and another process starves.
It's easy to reproduce with glmark2-es2-wayland running inside weston.
I added a trace into lima_sched_run_job() to print job->entity and it looks like weston doesn't get a chance to run its jobs when glmark2 is working:
[ 1530.992066] lima_sched_run_job: entity: ffff80006cf17010 <- weston GP job
[ 1530.997557] lima_sched_run_job: entity: ffff80006cf170a0 <- weston PP job
[ 1531.396922] lima_sched_run_job: entity: ffff80006cf17010
[ 1531.402561] lima_sched_run_job: entity: ffff80006cf170a0
[ 1531.532598] lima_sched_run_job: entity: ffff8000405e7010
[ 1531.565903] lima_sched_run_job: entity: ffff80006cf17010
[ 1531.571526] lima_sched_run_job: entity: ffff80006cf170a0
[ 1531.613123] lima_sched_run_job: entity: ffff80006cf17010
[ 1531.618601] lima_sched_run_job: entity: ffff80006cf170a0
[ 1531.650068] lima_sched_run_job: entity: ffff80003a43c810 <- glmark GP
[ 1531.655601] lima_sched_run_job: entity: ffff80003a43c8a0 <- glmark PP
[ 1531.680033] lima_sched_run_job: entity: ffff80006cf17010
[ 1531.685580] lima_sched_run_job: entity: ffff80006cf170a0
[ 1531.725125] lima_sched_run_job: entity: ffff80003a43c810
[ 1531.732648] lima_sched_run_job: entity: ffff80003a43c8a0
[ 1531.732672] lima_sched_run_job: entity: ffff80006cf17010
[ 1531.743621] lima_sched_run_job: entity: ffff80006cf170a0
[ 1531.756511] lima_sched_run_job: entity: ffff80003a43c810
[ 1531.764505] lima_sched_run_job: entity: ffff80003a43c810
[ 1531.775265] lima_sched_run_job: entity: ffff80003a43c8a0
[ 1531.782332] lima_sched_run_job: entity: ffff80003a43c810
[ 1531.783608] lima_sched_run_job: entity: ffff80003a43c8a0
[ 1531.794662] lima_sched_run_job: entity: ffff80003a43c810
[ 1531.795083] lima_sched_run_job: entity: ffff80003a43c8a0
[ 1531.802022] lima_sched_run_job: entity: ffff80006cf17010 <-- another weston GP job
[ 1531.807112] lima_sched_run_job: entity: ffff80003a43c8a0
[ 1531.810843] lima_sched_run_job: entity: ffff80003a43c810
[ 1531.823407] lima_sched_run_job: entity: ffff80003a43c8a0
[ 1531.823411] lima_sched_run_job: entity: ffff80003a43c810
[ 1531.835917] lima_sched_run_job: entity: ffff80003a43c810
[ 1531.836323] lima_sched_run_job: entity: ffff80003a43c8a0
[ 1531.848641] lima_sched_run_job: entity: ffff80003a43c810
[ 1531.848888] lima_sched_run_job: entity: ffff80003a43c8a0
[ 1531.860872] lima_sched_run_job: entity: ffff80003a43c810
[ 1531.861326] lima_sched_run_job: entity: ffff80003a43c8a0
[ 1531.873072] lima_sched_run_job: entity: ffff80003a43c810
[ 1531.873458] lima_sched_run_job: entity: ffff80003a43c8a0
[ 1531.885631] lima_sched_run_job: entity: ffff80003a43c810
[ 1531.885634] lima_sched_run_job: entity: ffff80003a43c8a0
<......> only glmark jobs here
[ 1536.575116] lima_sched_run_job: entity: ffff80003a43c8a0
[ 1537.064706] lima_sched_run_job: entity: ffff80006cf170a0 <-- weston PP job, and no other weston jobs for 6 seconds!
[ 1537.119308] lima_sched_run_job: entity: ffff80006cf17010
[ 1537.125606] lima_sched_run_job: entity: ffff80006cf170a0
[ 1537.167462] lima_sched_run_job: entity: ffff80006cf17010