Messages in this thread | | | From | "Luck, Tony" <> | Subject | RE: [PATCH v4 2/2] pid: Remove pidhash | Date | Wed, 11 Oct 2017 21:22:08 +0000 |
| |
> DEFINE(IA64_UPID_SHIFT, 5); > > Grepping for IA64_UPID_SHIFT leads us to some assembly > code implementing fsys_getpid (why is that in assembly?!):
The fast system call path has a whole host of serious restrictions on what it can touch. See Documentation/ia64/fsys.txt. Why is getpid() a fast system call? I think there was some application (or perhaps benchmark) that used it a lot.
> add r8=IA64_PID_LEVEL_OFFSET,r17 > ;; > ld4 r8=[r8] // r8 = pid->level > add r17=IA64_PID_UPID_OFFSET,r17 // r17 = &pid->numbers[0] > ;; > shl r8=r8,IA64_UPID_SHIFT > ;; > add r17=r17,r8 // r17 = &pid->numbers[pid->level] > ;; > ld4 r8=[r17] // r8 = pid->numbers[pid->level].nr > ;; > mov r17=0 > > Luckily it looks like this is only referencing the first members of struct upid, > and you are removing the last member, so I suspect you will be fine changing the IA64 > to this: > > BUILD_BUG_ON(sizeof(struct upid) != 16); > DEFINE(IA64_UPID_SHIFT, 4); > > Tony, does that look ok to you?
I think so. Respin and Cc: me on both patches in the series and I'll take it for a spin on h/w to make sure.
-Tony
| |