From owner-freebsd-scsi@FreeBSD.ORG Fri Jan 30 17:42:16 2015 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 61C3C95A for ; Fri, 30 Jan 2015 17:42:16 +0000 (UTC) Received: from nm21-vm4.bullet.mail.gq1.yahoo.com (nm21-vm4.bullet.mail.gq1.yahoo.com [98.136.217.51]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 29DC1EAB for ; Fri, 30 Jan 2015 17:42:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1422639735; bh=E1A7btyKeHDLVrN2HUVpvD21PvL4QD1xVMoC7nPtEnI=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject; b=J4EbAANKxIzn8ed0FtY5zzMl6D5cTsXtrLcqUy3Ual9+801ZyZXZHEcO0Bpg4MaK5JjPVtXhMu6F7cx2ArqtO/sBf294WXF6F+v2mFjKe+6Ly6gLWJ9HAXJt5lP1X3T7+BCZaf3k4KgVK1hGdsbi8IvJh7tCzOk6rvPUoTQfoGp825NCHeQCL1JErvIxlXVrZ726BKV4DoNvdIXy4TJjmuK5+Ol+lfeUIJlel8GN+orbl9cF9hr7imNzuPNGf7GzIH12DnxbpK4FO+9rfLJuxRTdVFpep+jaT+2XwXbWK+7X27mp8PHWwE8U1D9kM6vL39IIWrio/+09ZHGswSzICA== Received: from [98.137.12.188] by nm21.bullet.mail.gq1.yahoo.com with NNFMP; 30 Jan 2015 17:42:15 -0000 Received: from [208.71.42.193] by tm9.bullet.mail.gq1.yahoo.com with NNFMP; 30 Jan 2015 17:42:15 -0000 Received: from [127.0.0.1] by smtp204.mail.gq1.yahoo.com with NNFMP; 30 Jan 2015 17:42:15 -0000 X-Yahoo-Newman-Id: 101408.20218.bm@smtp204.mail.gq1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: bbeqlXcVM1mWt43134G3T0cR4O_ekzDvR_MVYx3LoDdrJWw uXUvv3rgZ6R8CBGrYCsjWHAMfJGOs8J978Hg2G7moOn5auoBoHgdzOd.ywEX Naxn0q4torsLLrczTf3mloig8KxtaUchSK8zh995REezbdoH88P4Dq9sSaXN d_Neg1GmrxTcFtkpULFQdw_fcjGcYTT5yP0_zoeaBHRbboQfHfUXVGRBM9vg Z78k6KIPNd.sD3P4zXpvSEPJA3Y6QIE878IypoAW24dxNhYCAcwQBBgghsig .6FZrxs3bxmYISONeVBo4HemXaWUwvrW_427xweh6bU15Gvy_mfEliYOZIcb NwGrRemBt9MsTccD9CuBOuPSEEysDwPWf6mdKG0ZGhetFyZ_djdUwO_KGofz KMj1ioAUyR91JnWSe11_XjAvv9N1cwI_2YHSuSbgUXqcdj5noaUpKxhvS0ef g52ohGp2WyiRgXWE0sS5Ms4dVJL8nHGw_OeyQhQvLdDfJsJ1uGYBT.TD6P2W VXbkMjhLjSZVrsLdA6kMJBsXxS5L27LVSK7n2D3NiZtw- X-Yahoo-SMTP: clhABp.swBB7fs.LwIJpv3jkWgo2NU8- Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: How to send 1MB I/O size in a single I/O request without split From: Scott Long In-Reply-To: <923e4c2e65d29f2f39e0aa2f6d4ab38a@mail.gmail.com> Date: Fri, 30 Jan 2015 10:42:11 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <840B5221-A5E5-4FBC-BA2A-F44EF4036C59@yahoo.com> References: <8B56B74C-7EBC-4D1B-89AB-46DA8ED05DD5@yahoo.com> <923e4c2e65d29f2f39e0aa2f6d4ab38a@mail.gmail.com> To: Sibananda Sahu X-Mailer: Apple Mail (2.2070.6) 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: Fri, 30 Jan 2015 17:42:16 -0000 > On Jan 30, 2015, at 2:41 AM, Sibananda Sahu = wrote: >=20 > Hey Scoot, >=20 > Thanks very much for your reply. >=20 >>> - How can I get more sge count in an I/O request? >>>=20 >=20 >> If you want to test multiple segments, I suggest leaving you system = running >> for a long time with multiple processes freeing and allocating memory = so >> that the system becomes >fragmented. You can also modify the = bus_dma_tag >> in your driver to specify a maximum segment size of 4k instead of >> (presumably in your case) something larger. That will force >busdma = to >> stop merging adjacent segments. >=20 > As you have said: >=20 > "The busdma API will see that the allocation is contiguous and attempt = to > merge the contiguous segments. This is usually desirable since few = segments > reduces processing overhead in the driver and the hardware." >=20 > If I will modify the bus_dma_tag in our driver to have a max segment = of 4K > then what is the performance impact? >=20 Most drivers have a for() loop that iterates through the list of = segments from busdma and stores them into SGE elements for the hardware to use. = Obviously, fewer segments means fewer trips through this loop. It also means a = smaller SGE list, which means less command data transferred over the PCI bus. = Though I cannot speak for the architecture details of your hardware, often = times the same optimizations apply to the hardware internally. With modern storage = controllers that are doing millions of i/o=E2=80=99s per second, these small = improvements can add up. Scott