[lkml]   [2017]   [Jun]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subjectzram hot_add device busy

While going through if there are new util-linux bugs reported I came a
cross this

Simple way to reproduce the issue is:
d=$(cat /sys/class/zram-control/hot_add) && zramctl --size 256M /dev/zram$d

I am not entirely sure, but drivers/block/zram/zram_drv.c function
zram_add() should block until the device is usable. Looking the code
that it might be the device_add_disk() from block/genhd.c that should
do the blocking. But perhaps it's best if I leave such detail to
people who know the code a bit better.

One thing annoys me. I expected 'zramctl --find --size 256M' to suffer
from same issue but it does not. I can only reproduce the issue when
triggering hot_add separately, and as quick as possibly using the
path. Notice that sometimes it takes second try before the hot_add and
use triggers the issue. That is almost certainly down to speed the
system in hand, e.g., quicker the computer less likely to trigger.

Sami Kerola

 \ /
  Last update: 2017-06-24 12:08    [W:0.030 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site