From owner-svn-src-all@FreeBSD.ORG Mon Jan 9 19:04:25 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2DF29106564A; Mon, 9 Jan 2012 19:04:25 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-tul01m020-f182.google.com (mail-tul01m020-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id C0E3C8FC16; Mon, 9 Jan 2012 19:04:24 +0000 (UTC) Received: by obbwd18 with SMTP id wd18so6152729obb.13 for ; Mon, 09 Jan 2012 11:04:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=rhuG35GXg8ZoF8llZeBuxjLpqlaIT8yqLdRCV1qODUY=; b=QqP2mAIsw8PnSO/HmvPKi6EHSUUnNrnfuT3gaeAtUCelEkqKrPyg026M7yShrzprxR H9EXJ2/s2BQGSDrTY2laah7c1cyMsmEgPqCcFOltQt8fGg2lxEY6vL2blNQAxpPC31SR JjhVE1rZsLoNs7uKbcBxGybApV/0qVCaDJBu4= MIME-Version: 1.0 Received: by 10.182.39.70 with SMTP id n6mr8871850obk.41.1326135863972; Mon, 09 Jan 2012 11:04:23 -0800 (PST) Received: by 10.182.152.6 with HTTP; Mon, 9 Jan 2012 11:04:23 -0800 (PST) In-Reply-To: <4F0B38B9.1020302@FreeBSD.org> References: <201112282249.pBSMnTZu028304@svn.freebsd.org> <4F0B38B9.1020302@FreeBSD.org> Date: Mon, 9 Jan 2012 11:04:23 -0800 Message-ID: From: Garrett Cooper To: Alexander Motin Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Maksim Yevmenkin Subject: Re: svn commit: r228939 - head/sys/dev/mps X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 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, 09 Jan 2012 19:04:25 -0000 2012/1/9 Alexander Motin : > On 09.01.2012 20:54, Maksim Yevmenkin wrote: >> >> On Wed, Dec 28, 2011 at 2:49 PM, Alexander Motin =A0wro= te: >> >>> Author: mav >>> Date: Wed Dec 28 22:49:28 2011 >>> New Revision: 228939 >>> URL: http://svn.freebsd.org/changeset/base/228939 >>> >>> Log: >>> =A0Set maximum I/O size for mps(4) to MAXPHYS. Looking into the code, I= see >>> =A0no reason why it should be limited to 64K of DFLTPHYS. DMA data tag = is >>> any >>> =A0way set to allow MAXPHYS, S/G lists (chain elements) are sufficient = and >>> =A0overflows are also handled. On my tests even 1MB I/Os are working fi= ne. >>> >>> =A0Reviewed by: =A0ken@ >>> >>> Modified: >>> =A0head/sys/dev/mps/mps_sas.c >>> >>> Modified: head/sys/dev/mps/mps_sas.c >>> >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D >>> --- head/sys/dev/mps/mps_sas.c =A0Wed Dec 28 22:18:53 2011 =A0 =A0 =A0 = =A0(r228938) >>> +++ head/sys/dev/mps/mps_sas.c =A0Wed Dec 28 22:49:28 2011 =A0 =A0 =A0 = =A0(r228939) >>> @@ -937,6 +937,7 @@ mpssas_action(struct cam_sim *sim, union >>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0cpi->transport_version =3D 0; >>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0cpi->protocol =3D PROTO_SCSI; >>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0cpi->protocol_version =3D SCSI_REV_SPC; >>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 cpi->maxio =3D MAXPHYS; >>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0cpi->ccb_h.status =3D CAM_REQ_CMP; >>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0break; >>> =A0 =A0 =A0 =A0} >> >> >> sorry for the late reply, but can we make in into tunable please? i >> have in local tree >> >> --- mps_sas.c.orig =A0 =A0 =A02011-11-17 02:05:04.000000000 -0800 >> +++ mps_sas.c =A0 2011-12-28 16:05:10.000000000 -0800 >> @@ -121,6 +121,11 @@ >> >> =A0MALLOC_DEFINE(M_MPSSAS, "MPSSAS", "MPS SAS memory"); >> >> +int mps_maxio =3D MAXPHYS; >> +TUNABLE_INT("hw.mps.maxio",&mps_maxio); >> +SYSCTL_INT(_hw_mps, OID_AUTO, maxio, CTLFLAG_RD,&mps_maxio, 0, >> + =A0 =A0 =A0 "CAM maxio override\n"); >> + >> =A0static __inline int mpssas_set_lun(uint8_t *lun, u_int ccblun); >> =A0static struct mpssas_target * mpssas_alloc_target(struct mpssas_softc= *, >> =A0 =A0 =A0struct mpssas_target *); >> @@ -938,6 +943,7 @@ >> >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0cpi->protocol =3D PROTO_SCSI; >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0cpi->protocol_version =3D SCSI_REV_SPC; >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0cpi->ccb_h.status =3D CAM_REQ_CMP; >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 cpi->maxio =3D mps_maxio; >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0break; >> =A0 =A0 =A0 =A0} >> =A0 =A0 =A0 =A0case XPT_GET_TRAN_SETTINGS: > > > We can. but could you explain why? Have you found any problems this chang= e? It would make it nice when dealing with different controllers -- a similar example is that mfi(4) has a tunable called hw.mfi.max_cmds which controls the I/O command queue size as not all MegaRAID cards have the same I/O queue size capabilities. Thanks, -Garrett