Page MenuHomeFreeBSD

D25625.id74316.diff
No OneTemporary

D25625.id74316.diff

Index: sys/arm64/arm64/machdep.c
===================================================================
--- sys/arm64/arm64/machdep.c
+++ sys/arm64/arm64/machdep.c
@@ -62,11 +62,14 @@
#include <sys/sysproto.h>
#include <sys/ucontext.h>
#include <sys/vdso.h>
+#include <sys/vmmeter.h>
#include <vm/vm.h>
+#include <vm/vm_param.h>
#include <vm/vm_kern.h>
#include <vm/vm_object.h>
#include <vm/vm_page.h>
+#include <vm/vm_phys.h>
#include <vm/pmap.h>
#include <vm/vm_map.h>
#include <vm/vm_pager.h>
@@ -170,6 +173,26 @@
static void
cpu_startup(void *dummy)
{
+ vm_paddr_t size;
+ int i;
+
+ printf("real memory = %ju (%ju MB)\n", ptoa((uintmax_t)realmem),
+ ptoa((uintmax_t)realmem) / 1024 / 1024);
+
+ if (bootverbose) {
+ printf("Physical memory chunk(s):\n");
+ for (i = 0; phys_avail[i + 1] != 0; i += 2) {
+ size = phys_avail[i + 1] - phys_avail[i];
+ printf("%#016jx - %#016jx, %ju bytes (%ju pages)\n",
+ (uintmax_t)phys_avail[i],
+ (uintmax_t)phys_avail[i + 1] - 1,
+ (uintmax_t)size, (uintmax_t)size / PAGE_SIZE);
+ }
+ }
+
+ printf("avail memory = %ju (%ju MB)\n",
+ ptoa((uintmax_t)vm_free_count()),
+ ptoa((uintmax_t)vm_free_count()) / 1024 / 1024);
undef_init();
install_cpu_errata();
Index: sys/geom/eli/g_eli.c
===================================================================
--- sys/geom/eli/g_eli.c
+++ sys/geom/eli/g_eli.c
@@ -88,6 +88,10 @@
SYSCTL_UINT(_kern_geom_eli, OID_AUTO, batch, CTLFLAG_RWTUN, &g_eli_batch, 0,
"Use crypto operations batching");
+u_int g_eli_direct = 1;
+SYSCTL_UINT(_kern_geom_eli, OID_AUTO, direct, CTLFLAG_RWTUN, &g_eli_direct, 0,
+ "Use direct dispatch");
+
/*
* Passphrase cached during boot, in order to be more user-friendly if
* there are multiple providers using the same passphrase.
@@ -734,6 +738,8 @@
gp->orphan = g_eli_orphan_spoil_assert;
gp->spoiled = g_eli_orphan_spoil_assert;
cp = g_new_consumer(gp);
+ if (g_eli_direct)
+ cp->flags |= G_CF_DIRECT_SEND | G_CF_DIRECT_RECEIVE;
error = g_attach(cp, pp);
if (error != 0)
goto end;
@@ -882,6 +888,8 @@
pp = NULL;
cp = g_new_consumer(gp);
+ if (g_eli_direct)
+ cp->flags |= G_CF_DIRECT_SEND | G_CF_DIRECT_RECEIVE;
error = g_attach(cp, bpp);
if (error != 0) {
if (req != NULL) {
@@ -969,6 +977,8 @@
* Create decrypted provider.
*/
pp = g_new_providerf(gp, "%s%s", bpp->name, G_ELI_SUFFIX);
+ if (g_eli_direct)
+ pp->flags |= G_PF_DIRECT_SEND | G_PF_DIRECT_RECEIVE;
pp->mediasize = sc->sc_mediasize;
pp->sectorsize = sc->sc_sectorsize;
LIST_FOREACH(gap, &bpp->aliases, ga_next)
Index: tests/sys/geom/class/eli/Makefile
===================================================================
--- tests/sys/geom/class/eli/Makefile
+++ tests/sys/geom/class/eli/Makefile
@@ -17,6 +17,7 @@
ATF_TESTS_SH+= misc_test
ATF_TESTS_SH+= onetime_test
ATF_TESTS_SH+= online_resize_test
+ATF_TESTS_SH+= reentrancy_test
ATF_TESTS_SH+= resize_test
ATF_TESTS_SH+= setkey_test

File Metadata

Mime Type
text/plain
Expires
Sun, Oct 19, 5:34 AM (4 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
23912487
Default Alt Text
D25625.id74316.diff (2 KB)

Event Timeline