[lkml]   [2018]   [Dec]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v3 7/7] zram: writeback throttle
On (12/03/18 08:18), Minchan Kim wrote:
> Per andrew's comment:
> I need to fix it to represent 4K always.


Then we need to increase bd_writes PAGE_SIZE/4K times in writeback_store()?

wb_count = atomic64_inc_return(&zram->stats.bd_writes);
if (wb_limit != 0 && wb_count >= wb_limit)
zram->stop_writeback = true;

bd_wb_limit is in 4K units; but in writeback_store() we alloc a full page
and write it to the backing device. So the actual number of written bytes
can be larger on systems with page_size > 4K. Right?


 \ /
  Last update: 2018-12-03 03:31    [W:0.057 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site