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

fix: incorrect O_DIRECT behavior for reads #12811

Merged
merged 1 commit into from
Jul 28, 2021

Conversation

harshavardhana
Copy link
Member

Description

fix: incorrect O_DIRECT behavior for reads

Motivation and Context

O_DIRECT behavior was broken and it was still
caching all the reads, this change properly fixes
this behavior.

How to test this PR?

Need to test on Linux kernel to observe the
reads and page-cache build up upon re-reads.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Optimization (provides speedup with no functional changes)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • Fixes a regression (If yes, please add commit-id or PR # here)
  • Documentation updated
  • Unit tests added/updated

Copy link
Member

@vadmeste vadmeste left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why we required DMA for direct IO in the past, any idea ?

cmd/xl-storage.go Outdated Show resolved Hide resolved
@harshavardhana
Copy link
Member Author

Not sure why we required DMA for direct IO in the past, any idea ?

DMA means direct access - to refer to O_DIRECT

@vadmeste
Copy link
Member

DMA means direct access - to refer to O_DIRECT

yes understood, but MinIO server won't start already if the disk doesn't support O_DIRECT, so I see this is more like a cleanup.

O_DIRECT behavior was broken and it was still
caching all the reads, this change properly fixes
this behavior.
@minio-trusted
Copy link
Contributor

Mint Automation

Test Result
mint-large-bucket.sh ✔️
mint-fs.sh ✔️
mint-gateway-s3.sh ✔️
mint-erasure.sh ✔️
mint-dist-erasure.sh ✔️
mint-zoned.sh ✔️
mint-gateway-nas.sh ✔️
mint-compress-encrypt-dist-erasure.sh ✔️
Deleting image on docker hub
Deleting image locally

@harshavardhana harshavardhana merged commit bfbdb8f into minio:master Jul 28, 2021
@harshavardhana harshavardhana deleted the fix-o-direct branch July 28, 2021 18:20
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.

None yet

4 participants