diff options
| author | Christoph Hellwig <hch@lst.de> | 2023-06-28 18:31:30 +0300 |
|---|---|---|
| committer | David Sterba <dsterba@suse.com> | 2023-08-21 15:52:14 +0300 |
| commit | 2c73162d649670045415537dc746f7524cda1405 (patch) | |
| tree | 5ff4e80739d5f009f2aa18ba2249ddc91cf7f4e9 /tools/perf/scripts/python/exported-sql-viewer.py | |
| parent | 0835d1e66e7f22428bbc2ea56cb488a7759b51e2 (diff) | |
| download | linux-2c73162d649670045415537dc746f7524cda1405.tar.xz | |
btrfs: improve the delalloc_to_write calculation in writepage_delalloc
Currently writepage_delalloc adds to delalloc_to_write in every loop
operation. That is not only more work than doing it once after the
loop, but can also over-increment the counter due to rounding errors
when a new loop iteration starts with an offset into a page.
Add a new page_start variable instead of recaculation that value over
and over, move the delalloc_to_write calculation out of the loop, use
the DIV_ROUND_UP helper instead of open coding it and remove the pointless
found local variable.
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions
