From owner-svn-src-head@freebsd.org Thu Feb 22 08:15:27 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 94F9BF11D88 for ; Thu, 22 Feb 2018 08:15:27 +0000 (UTC) (envelope-from steven.hartland@multiplay.co.uk) Received: from mail-wm0-x22a.google.com (mail-wm0-x22a.google.com [IPv6:2a00:1450:400c:c09::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ADA11746D4 for ; Thu, 22 Feb 2018 08:15:26 +0000 (UTC) (envelope-from steven.hartland@multiplay.co.uk) Received: by mail-wm0-x22a.google.com with SMTP id z9so2024361wmb.3 for ; Thu, 22 Feb 2018 00:15:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=multiplay-co-uk.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language; bh=YR4VBOi0YZyE6OjPpD+Mr4wxFKTZKCtDP9ZAThfqxmA=; b=HyZy6CtMbX37s+5cvbXnsPitxu57SD/KF1+qTa8DmIt4y58IKPov1pQ+hUvQSOkxbj O8yjLbvY95ln3OOkKAhRiujru89N14PTMCCGx5ljn7bMY/WJyE4haLztJGRXBoKPV2/i MT9qRHBwhHgQl2vOV4o/MpuygM/Vxr/0jbOsFBjtz/8G+eLXXj99KCcr1T4767WcxEQk W8Yo5+3YUnZAExoH6F9EFSVvl1gxPV2vBlsyoWRJFX7uXGzX0NtWz8SBaiQLx75NzKPq BJXRHeBnJ1XVXTlS6QOC9jxKpKuvthfddaMjU9VAcJd+gTrzbLinCl6aADLwRYE1676R nMfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=YR4VBOi0YZyE6OjPpD+Mr4wxFKTZKCtDP9ZAThfqxmA=; b=Pr6oLOBbGJMQbJ+pH/Q4CpwFQuD5iiSBAy4QnJPCZNud3AUUjrIoPFTPwNKqs/eJHl mxLsYrHfkj+8MwZyMGxyRBocQ0VxRzsBMJK9BPis6WssBjxzWAqvXUYfQweqK0n7zTpl r26rHyGBcEOuEBdSotLTBDu7UpeHkD4UAuK/2uhnRwmKaLyryFN64FgeYGZ3kRL2elpv BUQpov4/REg5bi0fCzytCIBKzNHINX+iajKiqjbBWiQ+sP9Ecz3KrQsOpyXVtuExQ5AI xCyfDdMtj3tjpiELdTfn+ZJ2uzNpia3AzI7T2KxGRhHZ36w8mQeWcO7s6Uhu2hMBUCZz cKBA== X-Gm-Message-State: APf1xPCUUnxRbVuMFT84B8eNH4FKZ0s8yFmaZ1vUhRusJgs4LgU9A3eH 08QFsBhr4tcxRbf/YVDJ5XDM0VQ7tYA= X-Google-Smtp-Source: AH8x224KF7fMoKh0Lv15EDs9NXP+5VcIie0zH7s1AeEEYyyXKXDBrB+MeFKNjYugDMvBT6+5fKDhyg== X-Received: by 10.28.191.3 with SMTP id p3mr4371827wmf.21.1519287325240; Thu, 22 Feb 2018 00:15:25 -0800 (PST) Received: from [10.10.1.111] ([185.97.61.1]) by smtp.gmail.com with ESMTPSA id 69sm48342wmw.32.2018.02.22.00.15.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Feb 2018 00:15:24 -0800 (PST) Subject: Re: svn commit: r329812 - head/sys/cam To: Warner Losh , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201802220543.w1M5hL8Q068794@repo.freebsd.org> From: Steven Hartland Message-ID: <2666dfe3-28af-06e2-2992-c57b6ba11c12@multiplay.co.uk> Date: Thu, 22 Feb 2018 08:15:25 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <201802220543.w1M5hL8Q068794@repo.freebsd.org> Content-Language: en-US Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 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: Thu, 22 Feb 2018 08:15:27 -0000 In our experience this is very device dependent, what lead you to this conclusion? On 22/02/2018 05:43, Warner Losh wrote: > Author: imp > Date: Thu Feb 22 05:43:20 2018 > New Revision: 329812 > URL: https://svnweb.freebsd.org/changeset/base/329812 > > Log: > Don't sort TRIMs. > > While the code for ada and da both assume that the trim list is > ordered when doing the coaleascing the TRIMs, it turns out that > creating the sorted list uses more resources than are saved by having > slightly fewer trims sent to the device. > > Sponsored by: Netflix > > Modified: > head/sys/cam/cam_iosched.c > > Modified: head/sys/cam/cam_iosched.c > ============================================================================== > --- head/sys/cam/cam_iosched.c Thu Feb 22 04:30:52 2018 (r329811) > +++ head/sys/cam/cam_iosched.c Thu Feb 22 05:43:20 2018 (r329812) > @@ -1392,7 +1392,7 @@ cam_iosched_queue_work(struct cam_iosched_softc *isc, > * the work on the bio queue. > */ > if (bp->bio_cmd == BIO_DELETE) { > - bioq_disksort(&isc->trim_queue, bp); > + bioq_insert_tail(&isc->trim_queue, bp); > #ifdef CAM_IOSCHED_DYNAMIC > isc->trim_stats.in++; > isc->trim_stats.queued++; >