Skip to content
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

[CI-NO-BUILD] [vioscsi] Programmatically determine max_segments #1306

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

benyamin-codez
Copy link
Contributor

@benyamin-codez benyamin-codez commented Feb 18, 2025

Refactors VioScsiFindAdapter() to:

  1. Use new mnemonic adaptExt->max_segments to replace adaptExt->max_physical_breaks (also used in the VioScsiBuildIo() and VioScsiReadExtendedData() functions)
  2. Enable Registry lookup for max_segments in neo value "MaxPhysicalSegments" or the legacy value "PhysicalBreaks". New value defined by REGISTRY_MAX_PH_SEGMENTS.
  3. Also derive max_segments from adaptExt->scsi_config.seg_max and from the adaptExt->scsi_config.max_sectors value
  4. Choose from among best candidates and check within limits
  5. Enforce legacy StorPort NOPB off-by-one behaviour and provide explanation
  6. Improves relevant instrumentation
  7. Use new mnemonic PHYS_SEGMENTS_LIMIT to replace MAX_PHYS_SEGMENTS
  8. Update VIRTIO_MAX_SG to (PHYS_SEGMENTS_LIMIT + 1)
  9. Update VIRTIO_SCSI_QUEUE_LAST to (MAX_CPU - VIRTIO_SCSI_REQUEST_QUEUE_0)
  10. Removed max_segments increment from calculation of sgMaxElements in VioScsiBuildIo()

Note: This commit enables the use of max_segments greater than adaptExt->scsi_config.seg_max (max = 254) up to PHYS_SEGMENTS_LIMIT (presently 512). PR #1316 increases this value to 1,022.

@benyamin-codez
Copy link
Contributor Author

Waiting on PR #1216 to merge before rebasing and review.

@benyamin-codez benyamin-codez changed the title [CI-NO-BUILD] [vioscsi] Programatically determine max_segments [CI-NO-BUILD] [vioscsi] Programmatically determine max_segments Feb 20, 2025
@benyamin-codez benyamin-codez force-pushed the vioscsi-max-segments branch 2 times, most recently from ff55a74 to 3e61c4f Compare February 26, 2025 09:21
Refactors VioScsiFindAdapter() to:

1.  Use new mnemonic adaptExt->max_segments to replace adaptExt->max_physical_breaks
    (also used in the VioScsiBuildIo() and VioScsiReadExtendedData() functions)
2.  Enable Registry lookup for max_segments in neo value "MaxPhysicalSegments" or
    the legacy value "PhysicalBreaks". New value defined by REGISTRY_MAX_PH_SEGMENTS.
3.  Also derive max_segments from adaptExt->scsi_config.seg_max and also from
    the adaptExt->scsi_config.max_sectors value
4.  Choose from among best candidates and check within limits
5.  Enforce legacy StorPort NOPB off-by-one behaviour and provide explanation
6.  Improves relevant instrumentation
7.  Use new mnemonic PHYS_SEGMENTS_LIMIT to replace MAX_PHYS_SEGMENTS
8.  Update VIRTIO_MAX_SG to (PHYS_SEGMENTS_LIMIT + 1)
9.  Update VIRTIO_SCSI_QUEUE_LAST to (MAX_CPU - VIRTIO_SCSI_REQUEST_QUEUE_0)
10. Removed max_segments increment from calculation of sgMaxElements in VioScsiBuildIo()

Note: This commit enables the use of max_segments greater than
      adaptExt->scsi_config.seg_max (max = 254) up to
      PHYS_SEGMENTS_LIMIT (presently 512).

Signed-off-by: benyamin-codez <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant