From owner-svn-src-head@FreeBSD.ORG Sat Oct 20 10:24:28 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A9F2DB09; Sat, 20 Oct 2012 10:24:28 +0000 (UTC) (envelope-from ndenev@gmail.com) Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com [209.85.212.172]) by mx1.freebsd.org (Postfix) with ESMTP id B739B8FC0A; Sat, 20 Oct 2012 10:24:27 +0000 (UTC) Received: by mail-wi0-f172.google.com with SMTP id hq12so858061wib.13 for ; Sat, 20 Oct 2012 03:24:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; bh=7JJSyMxMFPknyNOarM0nQXb8qcGY+WD7+L0/MLxHII4=; b=ymxO9uhIsG7H+tyE8SsdxpReA8F73OfxA0L5SwD6axrVSfb6URFELPpHAMgix+pcTD maXYhIX0d7a6x5SXGz2qxZFGl0VBCg5WS0T6FD75Hm7ZmlUTiw7AKmJ4+FyTosSfO1Hp UMXEGdIr8XUjUJU65dllRBAyPbx/dXLEP0uklMvDLY01VbV2L8oUcopBjBnefsmo+FRW sgrZH26rjmRZfpP2WS18BWJo6NOhyjbY6OjpsKKaot+ih1bxF2fH/Rz180vrFDb+LIX5 vhmakt1P88rqCRsIDzJoxy18XOepIOR3XzX0C8rMph1XE9Bg/4Z3xmZuVTRfeEGvDwpd m1aQ== Received: by 10.216.145.9 with SMTP id o9mr2211303wej.107.1350728661540; Sat, 20 Oct 2012 03:24:21 -0700 (PDT) Received: from [10.0.0.86] ([93.152.184.10]) by mx.google.com with ESMTPS id dt9sm39431990wib.1.2012.10.20.03.24.19 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 20 Oct 2012 03:24:20 -0700 (PDT) Subject: Re: svn commit: r241773 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs Mime-Version: 1.0 (Mac OS X Mail 6.1 \(1498\)) Content-Type: text/plain; charset=us-ascii From: Nikolay Denev In-Reply-To: <201210201002.q9KA2I1n002525@svn.freebsd.org> Date: Sat, 20 Oct 2012 13:24:18 +0300 Content-Transfer-Encoding: 7bit Message-Id: References: <201210201002.q9KA2I1n002525@svn.freebsd.org> To: Andriy Gapon X-Mailer: Apple Mail (2.1498) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Oct 2012 10:24:28 -0000 On Oct 20, 2012, at 1:02 PM, Andriy Gapon wrote: > Author: avg > Date: Sat Oct 20 10:02:18 2012 > New Revision: 241773 > URL: http://svn.freebsd.org/changeset/base/241773 > > Log: > zfs: wait in arc_lowmem only if curproc == pageproc > > ... otherwise the current thread might be holding ARC locks and thus run > into a deadlock. This happens, for example, when a thread does memory > allocation in the ARC code and runs into KVA shortage. > Also, it really makes the most sense to wait in pageproc, so that the > results of ARC reclamation are seen before the page cache is acted upon. > In other cases where vm_lowmem is invoked, e.g. on KVA space shortage, > the callers perform multiple attempts (up to 8) and wait for rather > long intervals between them (up to 4 seconds), so ARC reclaim results > should become visible even without explicit waiting on the ARC thread. > > Note that this is not a critical issue for typical ZFS usages where KVA > space should already be large enough. On amd64 systems setting KVA size > to twice the physical memory size is known to mitigate KVA fragmentation > issues in practice. > > Side note: perhaps vm_lowmem 'how' parameter should be used to > differentiate between causes of the event. > > Reported by: Nikolay Denev > MFC after: 19 days > > Modified: > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Thanks!