HomeFreeBSD

Revert "dtrace: make 'ring' and 'fill' policies imply 'noswitch' flag"

Description

Revert "dtrace: make 'ring' and 'fill' policies imply 'noswitch' flag"

This reverts commit e92491d95ff3500e140eafa614e88ca84ffb0d26.
It was cherry-picked as fb9c50f983ff6bdd6f33a22ae7d5b391435dd02a.

The general idea looked good to me. In particular, it allowed to save
some memory and avoid memory allocation failures when a large buffer
size was requested along with ring and fill policies.

But I didn't take into account that the second, supposedly unused
buffer, was actually used as the scratch buffer. The scratch buffer is
used as a temporary space for DTrace subroutines like copyin, copyinstr,
and alloca.

I think that the change can be fixed by allocating a separate smaller
buffer for the scratch buffer, but that fix would require more work than
I am able to do now. Hence the revert.

Reported by: Domagoj Stolfa
Diagnosed by: Domagoj Stolfa, markj

(cherry picked from commit b9827c007a7a39c7aeef73f8efc217b7b0099464)

Details

Provenance
avgAuthored on Sun, Apr 21, 10:07 AM
Parents
rG2b343cd2d5f0: oce(4): Fix a typo in a source code comment
Branches
Unknown
Tags
Unknown
Reverts
rGe92491d95ff3: dtrace: make 'ring' and 'fill' policies imply 'noswitch' flag