On Sun, Nov 29, 2020 at 02:03:57PM +0100, Michal Meloun wrote:
> On 28.11.2020 13:12, Konstantin Belousov wrote:
> > Author: kib
> > Date: Sat Nov 28 12:12:51 2020
> > New Revision: 368124
> > URL: https://svnweb.freebsd.org/changeset/base/368124
> > 
> > Log:
> >    Make MAXPHYS tunable.  Bump MAXPHYS to 1M.
> > 
> Unfortunately, bumping MAXPHYS broke arm kernel. The kernel runs out of KVA
> while running 'pbuf' keg init function. This causes that keg_alloc_slab()
> always returns NULL and for cycle in uma_prealloc() newer ends (whish should
> be considered as another bug).
> Do you think that MAXPHYS constant can depends on given arch?
> 128k (or 256k) sounds reasonable for arm32 systems...

I think it is reasonable to return to 128KB for 32bit systems.

diff --git a/sys/sys/param.h b/sys/sys/param.h
index 00fb0c860e7..076b1fcde05 100644
--- a/sys/sys/param.h
+++ b/sys/sys/param.h
@@ -159,8 +159,12 @@
 #ifndef DFLTPHYS
 #define DFLTPHYS       (64 * 1024)     /* default max raw I/O transfer size */
 #endif
-#ifndef MAXPHYS
-#define MAXPHYS                (1024 * 1024)   /* max raw I/O transfer size */
+#ifndef MAXPHYS                                /* max raw I/O transfer size */
+#ifdef __ILP32__
+#define MAXPHYS                (128 * 1024)
+#else
+#define MAXPHYS                (1024 * 1024)
+#endif
 #endif
 #ifndef MAXDUMPPGS
 #define MAXDUMPPGS     (DFLTPHYS/PAGE_SIZE)
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to