-
Notifications
You must be signed in to change notification settings - Fork 388
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[vioscsi] New ProcessQueue() routine #1214
base: master
Are you sure you want to change the base?
[vioscsi] New ProcessQueue() routine #1214
Conversation
Elminates VioScsiMSInterruptWorker() by refactoring contents into new ProcessQueue() routine. This consolidates the child processes of: HW_INTERRUPT HW_MESSAGE_SIGNALLED_INTERRUPT_ROUTINE Implemented using new tracing functionality, including use of new ENTER_INL_FN and EXIT_INL_FN functions when FORCEINLINE is used. Implemented new VIRTIO_SCSI_MSI_CONTROL_Q_OFFSET definition, and updated QUEUE_TO_MESSAGE() and MESSAGE_TO_QUEUE() to use it. DispatchQueue() now returns a BOOLEAN and uses new tracing functionality, as above. Signed-off-by: benyamin-codez <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As always, I really like your approach to these changes, the whole thing seems good to me, but for the sake of being pedantic, I did add one nit.
LGTM otherwise
Placeholder to kick off discussion re tracing issues... Hot path considerations. EDIT: I have raised PR #1228 to refactor tracing to use cold and hot paths. Please continue the discussion there. |
It is better to control debug level through the registry, similar to NetKVM. We haven't had a debug compilation option in the VS solution for a long time, so the printout will be only for very motivated developers. Also, there is a "regression" in behavior. Driver load printout was unconditional; now, it is not. |
Very interesting... I'll have another look with this example in mind. I had abandoned this because:
These two functions are IIRC, neither can be called until |
Just thought I'd best point out that these are compile-time conditional macros. I'm not proposing that it should be unprinted in "normal" operations. Using |
Just wanted to confirm my understanding was as above, i.e.:
Notwithstanding (1) above, to overcome the issue in (2) above, we could use a similar solution to That being said, we presently don't compile debug support, only ETW via the WPP compile-time mechanism. The driver currently supports a choice between the two at compile time only, and only via direct manipulation of the In any case, please note I have raised PR #1228 to refactor tracing to use cold and hot paths. This included changing It also introduces tracing and debug controls via compile-time environment variables. Please check it out. Best regards, |
Addendum to c4ac94b. 1. Removed references to obsoleted RUN_MIN_CHECKED definition (PR virtio-win#1228). Signed-off-by: benyamin-codez <[email protected]>
Eliminates
VioScsiMSInterruptWorker()
by refactoring contents into newProcessQueue()
routine.This consolidates the child processes of:
HW_INTERRUPT
HW_MESSAGE_SIGNALLED_INTERRUPT_ROUTINE
Implemented using new tracing functionality.
This includes use of the new
ENTER_INL_FN
andEXIT_INL_FN
functions whenFORCEINLINE
is used.Implemented new
VIRTIO_SCSI_MSI_CONTROL_Q_OFFSET
definitionUpdated
QUEUE_TO_MESSAGE()
andMESSAGE_TO_QUEUE()
to use it.DispatchQueue()
now returns aBOOLEAN
and uses new tracing functionality, as above.