From owner-freebsd-net@freebsd.org Fri May 3 20:14:33 2019 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8E1DC1599AE2 for ; Fri, 3 May 2019 20:14:33 +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) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A478886D14 for ; Fri, 3 May 2019 20:14:32 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id x43KEJkn015982 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Fri, 3 May 2019 23:14:22 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua x43KEJkn015982 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id x43KEJ1w015980; Fri, 3 May 2019 23:14:19 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 3 May 2019 23:14:19 +0300 From: Konstantin Belousov To: Garrett Wollman Cc: freebsd-net@freebsd.org Subject: Re: Disabling 9k jumbo clusters on mce(4) Message-ID: <20190503201419.GC2716@kib.kiev.ua> References: <23756.29338.729453.227593@khavrinen.csail.mit.edu> <20190503174715.GB2716@kib.kiev.ua> <23756.39015.553779.526064@khavrinen.csail.mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <23756.39015.553779.526064@khavrinen.csail.mit.edu> User-Agent: Mutt/1.11.4 (2019-03-13) 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.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on tom.home X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 May 2019 20:14:33 -0000 On Fri, May 03, 2019 at 03:37:11PM -0400, Garrett Wollman wrote: > < said: > > > On Fri, May 03, 2019 at 12:55:54PM -0400, Garrett Wollman wrote: > >> Does anyone have an easy patch to keep mce(4) from trying to use 9k > >> jumbo mbuf clusters? I think I went down this road once before but > >> the fix wasn't as obvious as it is for the Intel drivers. (I assume > >> the hardware is not so broken that it requires packets to be stored in > >> contiguous physical memory.) > > mce(4) only uses 9k clusters when you configured jumbo size larger than 4k. > > See r336407. > > Yes, and the point is to make it not use them *ever*, no matter what > the MTU is. 9k clusters are Bad News; given the choice I would just > as soon rip out all the code for greater-than-page-size clusters, but > that would be way more divergence-from-upstream in my source tree than > I can reasonably manage. In fact I was wrong, I forgot that code, sorry. It does not use clusters at all, instead the revision I mentioned loads a chain of mbufs of the MCLBYTES size for receive. Jumbo size only defines the number of mbufs.