Re: WSLg update on 1-5-2021 - BSD / WSL

2021-05-08 Thread Daniel Nebdal
On Thu, 6 May 2021 at 19:05, David Chisnall  wrote:
> [ Disclaimer: I work for Microsoft, but not on WSL and this is my own
> opinion ]
> (...)
> David
>

Just as a counterpoint to Rozhuk's take, that all sounds sensible
enough to me - FreeBSD would probably gain more from this than MS.

So the WSL2 TODO would be something like this:
* Ballooning driver. Seems like a proof of concept would be doable
enough - could you model it as an unkillable task (userland or kernel)
that wants to allocate a lot of memory, and anything it gets it hands
back to the host?
* Some sort of boot support. Maybe as a shim that chainloads an
unmodified kernel? Probably finicky, but also self-contained.
* File systems. Is / also 9p-over-HyperV-channels? If so that's kind
of crucial and perhaps the hardest part.

Oh, and how does the terminal work? You support multiple ttys, so I
guess it's not straight emulated serial?

-- 
Daniel
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Loading zfs module results in hangup on i386

2021-05-08 Thread Yasuhiro Kimura
From: Yasuhiro Kimura 
Subject: Re: Loading zfs module results in hangup on i386
Date: Sat, 08 May 2021 07:44:15 +0900 (JST)

>> Now I think I know what is the source of problem. After all, on
>> 13.0-RELEASE i386 system simply loading zfs module results in system
>> hang up.
>> 
>> The steps to reproduce it are,
>> 
>> 1. Boot with install media of 13.0-RELEASE i386
>> 2. At the first menu of FreeBSD installer, select 'Shell'.
>> 3. At the shell prompt, type `kldload zfs` and return key.
>> 
>> I confirmed hangup happens with VirtualBox, VMware Player and my bare
>> metal PC environement. So the problem doesn't depend on hardware.
>> 
>> And hangup also happens with 13-STABLE and 14-CURRENT.
> 
> This problem is already reported to Bugzilla.
> 
> Bug 254177 When ZFS is recognized, An i386 machine with a lot of memory hangs.
> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=254177

Referencing the bug report, I applied attached patch to d474440ab33 of
main (14-CURRENT). built install image and tried install of ZFS root
i386 system with it. Then it completed successfully with 8GB memory.

Additionally GENERIC kernel recognizes 8GB of memory. And ZFS root
system works fine without any tuning.

--
diff --git a/sys/contrib/openzfs/module/zfs/dbuf.c 
b/sys/contrib/openzfs/module/zfs/dbuf.c
index d48dc7943a2..c85500453fb 100644
--- a/sys/contrib/openzfs/module/zfs/dbuf.c
+++ b/sys/contrib/openzfs/module/zfs/dbuf.c
@@ -796,7 +796,7 @@ dbuf_init(void)
 * By default, the table will take up
 * totalmem * sizeof(void*) / 8K (1MB per GB with 8-byte pointers).
 */
-   while (hsize * zfs_arc_average_blocksize < physmem * PAGESIZE)
+   while (hsize * zfs_arc_average_blocksize < (uint64_t)physmem * PAGESIZE)
hsize <<= 1;
 
 retry:
--

---
Yasuhiro Kimura
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"