Commit bb7f5d9
Andreas Gruenbacher
gfs2: Fix should_fault_in_pages() logic
Fix the fault-in window size logic:
* Use a maximum window size of 1 MiB instead of BIO_MAX_VECS * PAGE_SIZE.
The previous window size was always one page because the pages variable
was accidentally being defined and then redefined in
should_fault_in_pages().
* The nr_dirtied heuristic for guessing when there might be memory
pressure often results in very small window sizes. Don't let
nr_dirtied drop below 8 pages (as btrfs does).
* Compute the window size in units of bytes, not pages.
* Account for page overlap (unaligned iterators).
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>1 parent b296393 commit bb7f5d9
1 file changed
Lines changed: 9 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
775 | 775 | | |
776 | 776 | | |
777 | 777 | | |
778 | | - | |
779 | | - | |
| 778 | + | |
780 | 779 | | |
781 | 780 | | |
782 | 781 | | |
| |||
785 | 784 | | |
786 | 785 | | |
787 | 786 | | |
| 787 | + | |
| 788 | + | |
788 | 789 | | |
789 | | - | |
| 790 | + | |
790 | 791 | | |
791 | | - | |
| 792 | + | |
| 793 | + | |
792 | 794 | | |
793 | | - | |
794 | | - | |
| 795 | + | |
| 796 | + | |
795 | 797 | | |
796 | 798 | | |
797 | 799 | | |
798 | | - | |
799 | | - | |
| 800 | + | |
800 | 801 | | |
801 | 802 | | |
802 | 803 | | |
| |||
0 commit comments