On Monday, 19 April 2021 13:28:07 EDT Robert Elz wrote:
> Date: Sun, 18 Apr 2021 18:58:56 +0000
> From: Andrew Parker <andrew%pmk1.net@localhost>
> Message-ID: <2245776.bZt9KSGgi3@t470s.local>
>
> | Does anyone else have a working L2ARC?
>
> Sorry, don't even know what that is, and don't (currently anyway) use zfs,
>
> but:
> | - interval = hz * l2arc_feed_secs;
> | + interval = mstohz(l2arc_feed_secs);
>
> Are you sure about that part of the change (the earlier fragment looked
> reasonable) ?
>
> mstohz() when starting with seconds (which the name of that var suggests)
> looks like it would be much smaller than intended, whereas simply
> multiplying seconds by hz gives ticks, which looks to be the objective in
> all of that. Alternatively multiply secs by 1000 to generate ms, and
> mstohz() that.
>
> Watch out for potential overflow in all of this though.
>
> kre
Oops. I completely misread how the return value of l2arc_write_interval is used so that patch doesn't make any sense. But adding the printf suggested earlier results in this just after boot:
[ 14.600107] WARNING: ZFS on NetBSD is under development
[ 14.650039] ZFS filesystem version: 5
[ 14.650039] wait 100
[ 15.690043] wait 96
[ 17.840054] wait 0
The l2arc then seems to hang indefinitely as I never see another l2 feed after the "wait 0" message:
kstat.zfs.misc.arcstats.evict_l2_cached = 0
kstat.zfs.misc.arcstats.evict_l2_eligible = 101888
kstat.zfs.misc.arcstats.evict_l2_ineligible = 0
kstat.zfs.misc.arcstats.evict_l2_skip = 0
kstat.zfs.misc.arcstats.l2_hits = 0
kstat.zfs.misc.arcstats.l2_misses = 55818
kstat.zfs.misc.arcstats.l2_feeds = 2
kstat.zfs.misc.arcstats.l2_rw_clash = 0
kstat.zfs.misc.arcstats.l2_read_bytes = 0
kstat.zfs.misc.arcstats.l2_write_bytes = 148992
kstat.zfs.misc.arcstats.l2_writes_sent = 2
kstat.zfs.misc.arcstats.l2_writes_done = 2
kstat.zfs.misc.arcstats.l2_writes_error = 0
kstat.zfs.misc.arcstats.l2_writes_lock_retry = 0
kstat.zfs.misc.arcstats.l2_evict_lock_retry = 0
kstat.zfs.misc.arcstats.l2_evict_reading = 0
kstat.zfs.misc.arcstats.l2_evict_l1cached = 0
kstat.zfs.misc.arcstats.l2_free_on_write = 0
kstat.zfs.misc.arcstats.l2_abort_lowmem = 0
kstat.zfs.misc.arcstats.l2_cksum_bad = 0
kstat.zfs.misc.arcstats.l2_io_error = 0
kstat.zfs.misc.arcstats.l2_size = 16384
kstat.zfs.misc.arcstats.l2_asize = 16384
kstat.zfs.misc.arcstats.l2_hdr_size = 88
kstat.zfs.misc.arcstats.l2_write_trylock_fail = 0
kstat.zfs.misc.arcstats.l2_write_passed_headroom = 0
kstat.zfs.misc.arcstats.l2_write_spa_mismatch = 29
kstat.zfs.misc.arcstats.l2_write_in_l2 = 0
kstat.zfs.misc.arcstats.l2_write_io_in_progress = 0
kstat.zfs.misc.arcstats.l2_write_not_cacheable = 36
kstat.zfs.misc.arcstats.l2_write_full = 0
kstat.zfs.misc.arcstats.l2_write_buffer_iter = 2
kstat.zfs.misc.arcstats.l2_write_pios = 2
kstat.zfs.misc.arcstats.l2_write_buffer_bytes_scanned = 5709824
kstat.zfs.misc.arcstats.l2_write_buffer_list_iter = 8
kstat.zfs.misc.arcstats.l2_write_buffer_list_null_iter = 4
I'll see if I can reproduce this in -current. Thanks both for looking! Perhaps this is more of a setup issue and not something for this list.