Page MenuHomeFreeBSD


Authored by mjg on Oct 23 2019, 5:59 PM.
Referenced Files
Unknown Object (File)
Wed, Jul 10, 10:19 PM
Unknown Object (File)
Tue, Jul 9, 5:13 PM
Unknown Object (File)
Sun, Jun 30, 2:20 AM
Unknown Object (File)
Fri, Jun 28, 4:47 PM
Unknown Object (File)
Sun, Jun 16, 6:31 PM
Unknown Object (File)
Sun, Jun 16, 10:01 AM
Unknown Object (File)
Jun 4 2024, 10:23 AM
Unknown Object (File)
May 17 2024, 3:07 AM



See r351584 for reasoning.

Sample results from make -j 40 bzImage:

96630750 (lockmgr:zfs)17400445 (rw:vm object)
19971882 (rw:vm object)9008902 (sleep mutex:zio_write_issue)
10328270 (spin mutex:sleepq chain)8802655 (spin mutex:sleepq chain)
6159891 (sleep mutex:vnode interlock)4737875 (sx:zp->z_acl_lock)
5128765 (spin mutex:sched lock 33)4459105 (rw:pmap pv list)
4995571 (spin mutex:sched lock 11)4343860 (sx:rrl->rr_lock)
4942302 (rw:pmap pv list)2906398 (lockmgr:zfs)

Diff Detail

Lint Skipped
Tests Skipped
Build Status
Buildable 27173

Event Timeline

I've been testing this patch for a while and it seems like…

it causes files written by LLD >= 9.0 (which uses ftruncate→mmap→rename→close)…

to become all zeroes after reboot.

(and possibly hangs on poweroff/reboot after the bufspacethings are done)

I see why, it misses one check. I'm probably going to fix this in a very different manner though. Thanks for the report!

  • perform a locked check for all conditions does the updated patch work for you?

  • trylock since the routine is called with the interlock held can you please retest on top fresh head? (specifically after r357070)

In D22130#512307, @mjg wrote: can you please retest on top fresh head? (specifically after r357070)

No longer hangs on reboot, but zeroed files still happen :(

Can you prepare a short reproducer? Preferably few commands in total.

I ran into problems with previous of the patch but everything works fine for me with this one.

In D22130#512369, @mjg wrote:

Can you prepare a short reproducer? Preferably few commands in total.

echo 'int main() {}' > hello.c
clang90 -o hello hello.c
./hello # should work
# cd to same directory
./hello # should report an exec format error or whatever it is, the file will be all zeros

(cc should work as well, current has clang 9.x in base)

Thanks a lot, I'll look into it.

  • handle mmap

The problem was that the following was not taken into consideration:

if ((obj = vp->v_object) != NULL && (vp->v_vflag & VV_NOSYNC) == 0 &&
    vm_object_mightbedirty(obj)) {
        vm_object_page_clean(obj, 0, 0, 0);

Now the testcase passes. Thanks a lot for testing.

This revision was not accepted when it landed; it landed in state Needs Review.Jan 30 2020, 2:14 AM
Closed by commit rS357281: zfs: use VOP_NEED_INACTIVE (authored by mjg). · Explain Why
This revision was automatically updated to reflect the committed changes.