From owner-svn-src-all@freebsd.org Sun Nov 29 17:36:35 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 93AB74A8848; Sun, 29 Nov 2020 17:36:35 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CkbBq1VrQz4vtL; Sun, 29 Nov 2020 17:36:34 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.16.1/8.16.1) with ESMTPS id 0ATHaL6W070086 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sun, 29 Nov 2020 19:36:24 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 0ATHaL6W070086 Received: (from kostik@localhost) by tom.home (8.16.1/8.16.1/Submit) id 0ATHaLkE070085; Sun, 29 Nov 2020 19:36:21 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 29 Nov 2020 19:36:21 +0200 From: Konstantin Belousov To: mmel@freebsd.org Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r368124 - in head/sys: cam cam/ata cam/ctl cam/mmc cam/nvme cam/scsi compat/linprocfs compat/linux conf contrib/openzfs/module/os/freebsd/zfs dev/ahci dev/ata dev/firewire dev/flash dev... Message-ID: References: <202011281212.0ASCCpjQ006999@repo.freebsd.org> <56ede111-cf89-366e-fbda-aa26f4a78a23@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56ede111-cf89-366e-fbda-aa26f4a78a23@freebsd.org> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on tom.home X-Rspamd-Queue-Id: 4CkbBq1VrQz4vtL X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Nov 2020 17:36:35 -0000 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)