From owner-freebsd-net@FreeBSD.ORG Thu Jan 23 07:32:52 2014 Return-Path: Delivered-To: net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E367D86E; Thu, 23 Jan 2014 07:32:52 +0000 (UTC) Received: from mail-qc0-x231.google.com (mail-qc0-x231.google.com [IPv6:2607:f8b0:400d:c01::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7E6E41B29; Thu, 23 Jan 2014 07:32:52 +0000 (UTC) Received: by mail-qc0-f177.google.com with SMTP id i8so1965540qcq.36 for ; Wed, 22 Jan 2014 23:32:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=abTkJrb4s8C2K/ZWTGcl+36nhF+VYmihowOClThVR9c=; b=MGcbWHiWk6sb/uUQ48en7jsjh/GYmhBAi4vsmEDPDJWdl0ETq3Z5L+jMzqv7NOZm/o pZ/wIVGAr3TjcHdAOnK6xTStOBDNB8mN0tzjlvEigvJ0Sw3xzXs+lJ3Mi4uqFmWs/tvo uH9XGtJmLiw47zZcTmOAIrOY4TqMi1oPUd3S40LBQMU4wrqVJjKkvRGz6KtjTGW8a3Cs rSOEB0heKcJTr0LNBBdO2ibKpeqzejtPemz+f68Ju5bt+/tP1pgtHR1nPWSH2k581k2c ykYJ00ghKm6kJWkQ1CIob5H4IpqcxTSvk9TTX+z818pwUG3ygBckhK1NG/FpncTCJG6F LcLw== MIME-Version: 1.0 X-Received: by 10.224.127.131 with SMTP id g3mr9189396qas.98.1390462371718; Wed, 22 Jan 2014 23:32:51 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.224.52.8 with HTTP; Wed, 22 Jan 2014 23:32:51 -0800 (PST) In-Reply-To: <21216.36928.132606.318491@hergotha.csail.mit.edu> References: <21216.22944.314697.179039@hergotha.csail.mit.edu> <52E06104.70600@FreeBSD.org> <21216.36928.132606.318491@hergotha.csail.mit.edu> Date: Wed, 22 Jan 2014 23:32:51 -0800 X-Google-Sender-Auth: k9lf16qRTSJDXM5a2XqxOd2A3gU Message-ID: Subject: Re: Use of contiguous physical memory in cxgbe driver From: Adrian Chadd To: Garrett Wollman Content-Type: text/plain; charset=ISO-8859-1 Cc: Navdeep Parhar , "net@freebsd.org" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Jan 2014 07:32:53 -0000 It's about time we taught the physmem allocator to be more conducive to physically contiguous allocations. A server with gigabytes of memory should be able to keep a couple tens of megabytes of 64k sized allocation chunks around for exactly this. -a On 22 January 2014 19:45, Garrett Wollman wrote: > < said: > >> On 01/22/14 15:52, Garrett Wollman wrote: >>> At this point everyone is well aware that requiring contiguous >>> physical page when the hardware can do scatter-gather is a very bad >>> idea. > >> I wouldn't put it this way. Using buffers with size > PAGE_SIZE has its >> advantages. > > These advantages do not come close to balancing out the disadvantage > of "your server eventually falls off the network due to physmem > fragmentation, better hope you can reset it remotely because driving > in to work at 3 AM sucks." > > If any free pages are available at all, the allocation of a 4k jumbo > mbuf will succeed. A 9k jumbo mbuf requires three physically > contiguous pages, and it's very, very easy for physical memory to get > fragmented to the point where that is impossible. > > -GAWollman > > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"