From owner-svn-src-all@freebsd.org Mon Nov 2 04:07:22 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EC976A1E205 for ; Mon, 2 Nov 2015 04:07:21 +0000 (UTC) (envelope-from jroberson@jroberson.net) Received: from mail-pa0-x233.google.com (mail-pa0-x233.google.com [IPv6:2607:f8b0:400e:c03::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BB4C513B0 for ; Mon, 2 Nov 2015 04:07:21 +0000 (UTC) (envelope-from jroberson@jroberson.net) Received: by pasz6 with SMTP id z6so134814894pas.2 for ; Sun, 01 Nov 2015 20:07:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jroberson_net.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version:content-type; bh=MvZukJWOZKYizJjyo/+CsrhQQNPlxzVZVAfOC/hdp64=; b=mC96YSgSFw62DKu0N6MF/lm4ZdrFu1smZSIP4k2zjChwewgDs2WUPI+YjF1RMqfmOZ 9nm+toL8Enavjtl6+yr7+da9xHvjNa9K0Wui/VrBPbF6bty1wI7YOB1H5M8L5Rni0vb4 KV9XB20R+p2gurDpsciQjWOZPiF1svmZW97hBtIfVb3GfzOgcMLhHJxq0vIfGDMpuWI1 ar39KvhNq8WzJVa/Zjkvauym+a9UiotW5NDgMRoYDfFMrT2+PttPDudZGWnhmfMctogy GWuTyH04Jl2cRc62RzwBZMc3nfGUhEgas6GpWd69II/dHRY5UzM8MyIiYG+iyCcD28Fu wIWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version:content-type; bh=MvZukJWOZKYizJjyo/+CsrhQQNPlxzVZVAfOC/hdp64=; b=JVJZDoLCXrskyYxzJdaNoLDyFP/tMpoDtX+0F3jW42J3hHI99p9Ua9epe0LTsXCsXv I7ur1IFYIb8ymYGb5MHwxAaS4GF4BCSDegwwuQM4S8Xn6iL3T+7Ck3XRq6Z0XyfnCb/p qdHmH+FOeVtwwN+5hsbSBjI98jCv5UPxnVt42um7sawVOJ7L8RBH42sGyA0xa3o+si3c qS7uK3IKGt0nFl6CRxSGIDP/I8hSdS1/6aiJwEKUHh7QKNREe+hc6a+A949eVyijant/ oppJMbrgY5lf0Smap3bSJenj9uhbN2xKy71xWxg7jtzoAOjcg7SRK7cGBH/lOcqh26ov 5Diw== X-Gm-Message-State: ALoCoQnHEP6gmjwmlO1uhGV79s9Stgjy8hoOqM+ELN6kBJHa+qCZqKkAmFHfTPhyaHoYXcbcAhvX X-Received: by 10.66.236.37 with SMTP id ur5mr25106982pac.66.1446437241113; Sun, 01 Nov 2015 20:07:21 -0800 (PST) Received: from rrcs-66-91-135-210.west.biz.rr.com (rrcs-66-91-135-210.west.biz.rr.com. [66.91.135.210]) by smtp.gmail.com with ESMTPSA id ez1sm21047607pab.6.2015.11.01.20.07.19 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 01 Nov 2015 20:07:20 -0800 (PST) Date: Sun, 1 Nov 2015 18:05:10 -1000 (HST) From: Jeff Roberson X-X-Sender: jroberson@desktop To: NGie Cooper cc: Adrian Chadd , Jeff Roberson , Mark Johnston , Warner Losh , benno , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r289279 - in head/sys: kern vm In-Reply-To: Message-ID: References: <201510140210.t9E2A79H056595@repo.freebsd.org> User-Agent: Alpine 2.20 (BSF 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 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: Mon, 02 Nov 2015 04:07:22 -0000 On Sun, 1 Nov 2015, NGie Cooper wrote: > >> On Nov 1, 2015, at 19:20, Adrian Chadd wrote: >> >> hiya jeff, >> >> this broke low-memory, no-swap boards (eg MIPS.) >> >> On a MIPS board (carambola2) with 32MB of RAM, just scp'ing a kernel >> into the rootfs on USB hangs the system. After doing some digging, I >> found this: >> >> >> INTERNAL: Allocating one item from buf free cache(0x83fea7e0) >> uma_zalloc_arg: Bucketzone returned NULL >> INTERNAL: Allocating one item from buf free cache(0x83fea7e0) >> uma_zalloc_arg: Bucketzone returned NULL >> >> .. and it was just stuck in a loop trying to allocate them, failing, >> and trying to allocate them again. >> >> I'll see if I can reproduce it with a qemu emulator with sufficiently >> low RAM so you don't need a MIPS router to reproduce it. >> >> It's sufficient to just start the scp; it runs out of RAM within a >> couple of seconds. >> >> Any ideas? > > What happens if you change vfs.maxbufspace ? > > The reason that I?m noting is that (if I?m reading the code correctly), it?s now allocating 16 clean queues instead of 1 and each is up to vfs.maxbufspace size, which is 256MB per queue based on this line: > > + clean_queues = MIN(howmany(maxbufspace, 256*1024*1024), CLEAN_QUEUES); > > The 256MB amount seems like it should be a tunable, as well as the CLEAN_QUEUES #define? it?s a bit high for low memory platforms, i.e. platforms with <372MB of scratch space to play around with I?m guessing? maxbufspace is still a global. It just makes N queues for every 256MB of configured buffer cache size. We shouldn't be looping forever. It should sleep and try to re-allocate. How many cpus are on the mips board? We may need to implement something to directly flush the buf zone and disable the per-cpu caches when allocation fails. Jeff > > Thanks, > -NGie