From owner-freebsd-scsi@FreeBSD.ORG Mon Dec 22 18:37:52 2014 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2F5EAC92 for ; Mon, 22 Dec 2014 18:37:52 +0000 (UTC) Received: from exprod7og123.obsmtp.com (exprod7og123.obsmtp.com [64.18.2.24]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D318615FA for ; Mon, 22 Dec 2014 18:37:51 +0000 (UTC) Received: from mail-pd0-f171.google.com ([209.85.192.171]) (using TLSv1) by exprod7ob123.postini.com ([64.18.6.12]) with SMTP ID DSNKVJhk+bV3CBjDMxzuMi8MPawX2isiEJYC@postini.com; Mon, 22 Dec 2014 10:37:51 PST Received: by mail-pd0-f171.google.com with SMTP id y13so6336663pdi.30 for ; Mon, 22 Dec 2014 10:37:44 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:references:in-reply-to:mime-version :thread-index:date:message-id:subject:to:cc:content-type; bh=NZTYkajeCSNVGsOK8hezW3kY3u7MF1W9xgPIMYhGHJI=; b=DKfvr58uURZDxUjEaCZOD5pPx4/ntRg0y8+b7sHWqG10preSAkFmPN/MbVQR+fSusn SDON8boTwT5/aUbnkZk1MNP4veoUcgKSvHnoCUpZYr465zE2pihYsezKjnV+0pcTNwQx gTxLpeaVWA4itp01tKXXbM9ryxMHyCAWOmJGY7bMOKMyn6lfPk1QecdZJwne6DIIzTQv oARtb1+gIZA8AcXw1PKYs00s3UpvmjvlAyTWL++/3YqIF6yCvIxvzfg7RLlqQSmIjZ2c o5tmycibWNeqyBMDfjBPBisPraX1f+Pqs0Pb7LaDBamtg8T03fMBzGWI8cX6XSmSrliv hkqw== X-Received: by 10.68.134.74 with SMTP id pi10mr22404805pbb.4.1419271575248; Mon, 22 Dec 2014 10:06:15 -0800 (PST) X-Gm-Message-State: ALoCoQk8iEf0aCiBZitHo/gn6CVO/UbysfMcG9m1FuwxXmpwsy6pl44UtF0gpAe/n0LoDUYvWMxkwD23sMTZPD40fjw1v5TLTlf8eZX3rP5VYhI+6OFZhKzDLmeTH90wvqEMvO6f8y0yEaEh9ZViv0EgvdFK9fIZAw== X-Received: by 10.68.134.74 with SMTP id pi10mr22404751pbb.4.1419271574772; Mon, 22 Dec 2014 10:06:14 -0800 (PST) From: Stephen Mcconnell References: <20141220155615.GT2148@kib.kiev.ua> In-Reply-To: <20141220155615.GT2148@kib.kiev.ua> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQIUTMsWH5xE3Yddw0LV/E3UBwIgXQHQ8MymnAT57KA= Date: Mon, 22 Dec 2014 11:06:14 -0700 Message-ID: <10ae75e487522c53d4bf5da0545fd755@mail.gmail.com> Subject: RE: changing kern.bio_transient_maxcnt fixes panic To: Konstantin Belousov Content-Type: text/plain; charset=UTF-8 Cc: freebsd-scsi@freebsd.org X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2014 18:37:52 -0000 > -----Original Message----- > From: Konstantin Belousov [mailto:kostikbel@gmail.com] > Sent: Saturday, December 20, 2014 8:56 AM > To: Stephen Mcconnell > Cc: freebsd-scsi@freebsd.org; slm@freebsd.org > Subject: Re: changing kern.bio_transient_maxcnt fixes panic > > On Fri, Dec 19, 2014 at 11:16:36AM -0700, Stephen Mcconnell wrote: > > changing kern.bio_transient_maxcnt fixes panic > > > > Hi Konstantine. I hope you are the right person to help with this. > > Or perhaps someone else on the list can help. > > > > We (Avago) have a customer who is getting the following panic. They > > are using the mrsas (MegaRAID) driver in FreeBSD 10. In a test, they > > tried to restore a database backup of 3GB. After the restore they > > queried the database and then saw the panic. They found this link, > > saying that changing the value of kern.bio_transient_maxcnt should fix > > the problem. It did fix the problem, be we would like to know why it > > helped so that we???re not just putting a band-aid on it. > > > > *https://lists.freebsd.org/pipermail/freebsd-stable/2013-October/07557 > > 7.html* > > > 7.html> > > > > Also, I found this link with the same type of question. > > > > *https://docs.freebsd.org/cgi/getmsg.cgi?fetch=179246+182329+/usr/loca > > l/www/db/text/2014/freebsd-questions/20141019.freebsd-questions* > > > l/www/db/text/2014/freebsd-questions/20141019.freebsd-questions> > > > > Can you explain why changing this value fixes this problem, and what > > we might need to do in the driver to make a permanent fix? > > The tunable controls the size of the KVA area used to map pages of the bio's > which are not mapped into KVA, but which are passed to a driver that requires > mapped bio's. > > The auto-tuning logic was developed with an assumption that the system load > consists of the typical UFS-generated I/O. It is possible, for some i/o pathes. to > generate more i/o. > > Note that the transient mappings are only needed when the driver does not > handle unmapped bio's. So the proper fix is to add support for the unmapped > i/o, see e.g. mfi(4); the required modifications are relatively simple. If you driver > already supports unmapped i/o, then there is something else going on. Thanks for your help Konstantin. It looks like we may need to add that support.