From owner-freebsd-current@FreeBSD.ORG Thu Jan 3 23:09:05 2008 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B868D16A417; Thu, 3 Jan 2008 23:09:05 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id 4915D13C4D3; Thu, 3 Jan 2008 23:09:05 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from phobos.samsco.home (phobos.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.8/8.13.8) with ESMTP id m03N8xJZ064397; Thu, 3 Jan 2008 16:09:00 -0700 (MST) (envelope-from scottl@samsco.org) Message-Id: From: Scott Long To: John Baldwin In-Reply-To: <200801031746.15225.jhb@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Apple Message framework v915) Date: Thu, 3 Jan 2008 16:08:59 -0700 References: <477C82F0.5060809@freebsd.org> <863ateemw2.fsf@ds4.des.no> <477D6078.5030805@samsco.org> <200801031746.15225.jhb@freebsd.org> X-Mailer: Apple Mail (2.915) X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (pooker.samsco.org [168.103.85.57]); Thu, 03 Jan 2008 16:09:00 -0700 (MST) X-Spam-Status: No, score=-1.4 required=5.4 tests=ALL_TRUSTED autolearn=failed version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on pooker.samsco.org Cc: =?ISO-8859-1?Q?Dag-Erling_Sm=F8rgrav?= , freebsd-current@freebsd.org, Jason Evans Subject: Re: sbrk(2) broken X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jan 2008 23:09:05 -0000 On Jan 3, 2008, at 3:46 PM, John Baldwin wrote: > On Thursday 03 January 2008 05:23:52 pm Scott Long wrote: >> Dag-Erling Sm=F8rgrav wrote: >>> Jason Evans writes: >>>> [sbrk is broken] >>> >>> The real question is why we would revert perfectly good code =20 >>> (jemalloc) >>> from using a modern interface to using one that has been obsolete =20= >>> for >>> twenty years, and marked as such in the man page for seven years. >>> >>> If rwatson@ wants malloc() to respect resource limits, he can bloody >>> well fix mmap(). Until he does, the datasize limit is a joke =20 >>> anyway, as >>> anyone can circumvent it by either using mmap() instead of =20 >>> malloc() or >>> setting _malloc_options before calling malloc(). >>> >> >> That is a pretty damning argument in my mind. Why make such a major >> change right before the release when it's effectively useless? > > The motivation for the change is to preserve POLA as malloc() does =20 > honor > RLIMIT_DATA in previous releases (4.x, 6.x, etc.). That said, I think > RLIMIT_VMEM is probably more useful going forward. I know at work =20 > we have > lots of hacks to deal with maxdsiz and trying to allow apps that use =20= > large > malloc() and large mmap both cooperate. Having one resource limit =20 > for malloc > + mmap is probably best for the future. > If it were happening on a stable branch, I'd agree more with the POLA =20= argument. The tradeoff between last minute destabilization, which is exactly =20 what happened here, and the highly imperfect and antiquated justification, is pretty =20= bogus. Scott