Am 20.04.20 um 10:10 schrieb Christoph Hellwig:
On Mon, Apr 20, 2020 at 09:42:13AM +0200, Jean-Philippe Brucker wrote:
Right, I can see the appeal. I still like having a single mmu notifier per
mm because it ensures we allocate a single PASID per mm (as required by
x86). I suppose one alternative is to maintain a hashtable of mm->pasid,
to avoid iterating over all bonds during allocation.
Given that the PASID is a pretty generic and important concept can
we just add it directly to the mm_struct and allocate it lazily once
we first need it?
Well the problem is that the PASID might as well be device specific.
E.g. some devices use 16bit PASIDs, some 15bit, some other only 12bit.
So what could (at least in theory) happen is that you need to allocate
different PASIDs for the same process because different devices need one.
Regards,
Christian.