mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
lib/fs: typo fix: read blocks bigger than 8KB via pread()
call instead of using mmap
This commit is contained in:
parent
ca28a3e805
commit
7a045125cc
1 changed files with 1 additions and 1 deletions
|
@ -32,7 +32,7 @@ func (r *ReaderAt) MustReadAt(p []byte, off int64) {
|
||||||
if len(p) == 0 {
|
if len(p) == 0 {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if len(r.mmapData) == 0 || len(p) > 8*1024*1024 {
|
if len(r.mmapData) == 0 || len(p) > 8*1024 {
|
||||||
// Read big blocks directly from file.
|
// Read big blocks directly from file.
|
||||||
// This could be faster than reading these blocks from mmap,
|
// This could be faster than reading these blocks from mmap,
|
||||||
// since it triggers less page faults.
|
// since it triggers less page faults.
|
||||||
|
|
Loading…
Reference in a new issue