From owner-freebsd-arch Sun Jul 14 3:30: 6 2002 Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EE1B237B401 for ; Sun, 14 Jul 2002 03:29:58 -0700 (PDT) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2266443E4A for ; Sun, 14 Jul 2002 03:29:58 -0700 (PDT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.3/8.12.2) with ESMTP id g6EARoXB062434; Sun, 14 Jul 2002 12:27:50 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: Don Lewis Cc: arch@FreeBSD.ORG Subject: Re: wiring the sysctl output buffer In-Reply-To: Your message of "Sun, 14 Jul 2002 03:20:04 PDT." <200207141020.g6EAK4wr020922@gw.catspoiler.org> Date: Sun, 14 Jul 2002 12:27:50 +0200 Message-ID: <62432.1026642470@critter.freebsd.dk> From: Poul-Henning Kamp Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message <200207141020.g6EAK4wr020922@gw.catspoiler.org>, Don Lewis writes: >On 14 Jul, Poul-Henning Kamp wrote: >> In message <200207140954.g6E9sBwr020599@gw.catspoiler.org>, Don Lewis writes: >>>On 14 Jul, Poul-Henning Kamp wrote: > >>>> It used to be that sysctl unconditionally wired the output buffer, >>>> but that gave rise to a host of other problems. >>> >>>Anything specific that I should be aware of? >> >> No, just bad deadlocks and such. >> >> You may also want to restrict the amount of buffer you pin >> if I hand the kernel a 2G buffer for a 4 byte sysctl integer >> you wouldn't want to pin it all. > >Yeah, that could be bad, but the SYSCTL_OUT() in the current API pins >the whole user supplied buffer on the first call. My new entry point >does the same thing, but allows the caller to do this potentially >blocking operation earlier. I know, but that also affords an opportunity to be smarter (ie: letting the entry point say "I need this much storage"). -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message