From owner-svn-src-all@freebsd.org Wed Apr 19 17:40:54 2017 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 4277ED4685D; Wed, 19 Apr 2017 17:40:54 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 05CB31D47; Wed, 19 Apr 2017 17:40:54 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1d0tav-0007sX-Ff; Wed, 19 Apr 2017 20:40:45 +0300 Date: Wed, 19 Apr 2017 20:40:45 +0300 From: Slawa Olhovchenkov To: Scott Long Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r317143 - in head/sys/cam: . ata scsi Message-ID: <20170419174045.GD83631@zxy.spb.ru> References: <201704191504.v3JF4r5T050468@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201704191504.v3JF4r5T050468@repo.freebsd.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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: Wed, 19 Apr 2017 17:40:54 -0000 On Wed, Apr 19, 2017 at 03:04:53PM +0000, Scott Long wrote: > Author: scottl > Date: Wed Apr 19 15:04:52 2017 > New Revision: 317143 > URL: https://svnweb.freebsd.org/changeset/base/317143 > > Log: > Add infrastructure to the ATA and SCSI transports that supports > using a driver-supplied sbuf for printing device discovery > announcements. This helps ensure that messages to the console > will be properly serialized (through sbuf_putbuf) and not be > truncated and interleaved with other messages. The > infrastructure mirrors the existing xpt_announce_periph() > entry point and is opt-in for now. No content or formatting > changes are visible to the operator other than the new coherency. > > While here, eliminate the stack usage of the temporary > announcement buffer in some of the drivers. It's moved to the > softc for now, but future work will eliminate it entirely by > making the code flow more linear. Future work will also address > locking so that the sbufs can be dynamically sized. > > The scsi_da, scs_cd, scsi_ses, and ata_da drivers are converted > at this point, other drivers can be converted at a later date. > A tunable+sysctl, kern.cam.announce_nosbuf, exists for testing > purposes but will be removed later. > > TODO: > Eliminate all of the code duplication and temporary buffers. The > old printf-based methods will be retired, and xpt_announce_periph() > will just be a wrapper that uses a dynamically sized sbuf. This > requires that the register and deregister paths be made malloc-safe, > which they aren't currently. Thanks! MFC planed?