From owner-svn-src-head@freebsd.org Fri Sep 15 20:15:56 2017 Return-Path: Delivered-To: svn-src-head@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 CEC1BE072B8; Fri, 15 Sep 2017 20:15:56 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 9C92177021; Fri, 15 Sep 2017 20:15:56 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8FKFtx4050863; Fri, 15 Sep 2017 20:15:55 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8FKFtn3050862; Fri, 15 Sep 2017 20:15:55 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201709152015.v8FKFtn3050862@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 15 Sep 2017 20:15:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323624 - head/sys/cam X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/cam X-SVN-Commit-Revision: 323624 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 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: Fri, 15 Sep 2017 20:15:56 -0000 Author: imp Date: Fri Sep 15 20:15:55 2017 New Revision: 323624 URL: https://svnweb.freebsd.org/changeset/base/323624 Log: Update comments on what the CAM_IOSCHED_FLAG_TRIM_ACTIVE means. It's intended only for those situations where the periph driver ones to limit the number of trims active to one and only one. Also update comments on associated functions. Sponsored by: Netflix Modified: head/sys/cam/cam_iosched.c Modified: head/sys/cam/cam_iosched.c ============================================================================== --- head/sys/cam/cam_iosched.c Fri Sep 15 20:12:38 2017 (r323623) +++ head/sys/cam/cam_iosched.c Fri Sep 15 20:15:55 2017 (r323624) @@ -673,7 +673,10 @@ cam_iosched_cl_maybe_steer(struct control_loop *clp) } #endif - /* Trim or similar currently pending completion */ +/* + * Trim or similar currently pending completion. Should only be set for + * those drivers wishing only one Trim active at a time. + */ #define CAM_IOSCHED_FLAG_TRIM_ACTIVE (1ul << 0) /* Callout active, and needs to be torn down */ #define CAM_IOSCHED_FLAG_CALLOUT_ACTIVE (1ul << 1) @@ -1387,7 +1390,7 @@ cam_iosched_schedule(struct cam_iosched_softc *isc, st } /* - * Complete a trim request + * Complete a trim request. Mark that we no longer have one in flight. */ void cam_iosched_trim_done(struct cam_iosched_softc *isc) @@ -1437,7 +1440,8 @@ cam_iosched_bio_complete(struct cam_iosched_softc *isc /* * Tell the io scheduler that you've pushed a trim down into the sim. - * xxx better place for this? + * This also tells the I/O scheduler not to push any more trims down, so + * some periphs do not call it if they can cope with multiple trims in flight. */ void cam_iosched_submit_trim(struct cam_iosched_softc *isc)