Skip to content

Commit a55c722

Browse files
committed
Revert "mm: support POSIX_FADV_NOREUSE"
This reverts commit d065bbc. JIRA: https://issues.redhat.com/browse/RHEL-80655 Upstream Status: RHEL-only It was found that the introduction of POSIX_FADV_NOREUSE in 9.6 is causing 10-20x slow down in OCP's etcd compaction which we believe is due to increased OCP API latency. Signed-off-by: Luiz Capitulino <[email protected]>
1 parent c0218fe commit a55c722

File tree

3 files changed

+1
-9
lines changed

3 files changed

+1
-9
lines changed

include/linux/fs.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,6 @@ typedef int (dio_iodone_t)(struct kiocb *iocb, loff_t offset,
163163
/* File supports DIRECT IO */
164164
#define FMODE_CAN_ODIRECT ((__force fmode_t)0x400000)
165165

166-
#define FMODE_NOREUSE ((__force fmode_t)0x800000)
167-
168166
/* File supports non-exclusive O_DIRECT writes from multiple threads */
169167
#define FMODE_DIO_PARALLEL_WRITE ((__force fmode_t)0x1000000)
170168

include/linux/mm_inline.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -584,9 +584,6 @@ static inline bool vma_has_recency(struct vm_area_struct *vma)
584584
if (vma->vm_flags & (VM_SEQ_READ | VM_RAND_READ))
585585
return false;
586586

587-
if (vma->vm_file && (vma->vm_file->f_mode & FMODE_NOREUSE))
588-
return false;
589-
590587
return true;
591588
}
592589

mm/fadvise.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ int generic_fadvise(struct file *file, loff_t offset, loff_t len, int advice)
7979
case POSIX_FADV_NORMAL:
8080
file->f_ra.ra_pages = bdi->ra_pages;
8181
spin_lock(&file->f_lock);
82-
file->f_mode &= ~(FMODE_RANDOM | FMODE_NOREUSE);
82+
file->f_mode &= ~FMODE_RANDOM;
8383
spin_unlock(&file->f_lock);
8484
break;
8585
case POSIX_FADV_RANDOM:
@@ -106,9 +106,6 @@ int generic_fadvise(struct file *file, loff_t offset, loff_t len, int advice)
106106
force_page_cache_readahead(mapping, file, start_index, nrpages);
107107
break;
108108
case POSIX_FADV_NOREUSE:
109-
spin_lock(&file->f_lock);
110-
file->f_mode |= FMODE_NOREUSE;
111-
spin_unlock(&file->f_lock);
112109
break;
113110
case POSIX_FADV_DONTNEED:
114111
__filemap_fdatawrite_range(mapping, offset, endbyte,

0 commit comments

Comments
 (0)