I've just noticed that DTrace allocates two per-CPU principal buffers even when a bufpolicy of ring or fill is used.
I believe that the second buffer is never used in those cases.
This is the code:
if (flags & DTRACEBUF_NOSWITCH)
continue;
if ((buf->dtb_xamot = kmem_zalloc(size,
KM_NOSLEEP | KM_NORMALPRI)) == NULL)
goto err;
As far as I can see, DTRACEBUF_NOSWITCH is not implied by DTRACEBUF_RING or
DTRACEBUF_FILL.
Maybe it should be? -- Andriy Gapon
