From owner-svn-src-head@freebsd.org Thu Jan 7 16:27:36 2016 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 20D67A67C39; Thu, 7 Jan 2016 16:27:36 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from mr11p00im-asmtp003.me.com (mr11p00im-asmtp003.me.com [17.110.69.254]) (using TLSv1.2 with cipher DHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0EA4112A7; Thu, 7 Jan 2016 16:27:36 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from [192.168.1.4] (c-24-6-178-251.hsd1.ca.comcast.net [24.6.178.251]) by mr11p00im-asmtp003.me.com (Oracle Communications Messaging Server 7.0.5.36.0 64bit (built Sep 8 2015)) with ESMTPSA id <0O0L00DU6CDYVL00@mr11p00im-asmtp003.me.com>; Thu, 07 Jan 2016 16:27:35 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-01-07_04:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 clxscore=1011 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1510270003 definitions=main-1601070287 User-Agent: Microsoft-MacOutlook/0.0.0.151217 Date: Thu, 07 Jan 2016 08:27:34 -0800 Subject: Re: svn commit: r293328 - head/sys/dev/nvme From: Ravi Pokala Sender: "Pokala, Ravi" To: Jim Harris , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-id: <6496C054-6FED-4B41-8EF8-8067E8B6C866@panasas.com> Thread-topic: svn commit: r293328 - head/sys/dev/nvme References: <201601071618.u07GIXdd054147@repo.freebsd.org> In-reply-to: <201601071618.u07GIXdd054147@repo.freebsd.org> MIME-version: 1.0 Content-type: text/plain; charset=UTF-8 Content-transfer-encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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, 07 Jan 2016 16:27:36 -0000 -----Original Message----- From: on behalf of Jim Harris Date: 2016-01-07, Thursday at 08:18 To: , , Subject: svn commit: r293328 - head/sys/dev/nvme >Author: jimharris >Date: Thu Jan 7 16:18:32 2016 >New Revision: 293328 >URL: https://svnweb.freebsd.org/changeset/base/293328 > >... > >Modified: head/sys/dev/nvme/nvme_ctrlr.c >============================================================================== >--- head/sys/dev/nvme/nvme_ctrlr.c Thu Jan 7 16:12:42 2016 (r293327) >+++ head/sys/dev/nvme/nvme_ctrlr.c Thu Jan 7 16:18:32 2016 (r293328) >@@ -42,6 +42,12 @@ __FBSDID("$FreeBSD$"); > > #include "nvme_private.h" > >+/* >+ * Used for calculating number of CPUs to assign to each core and number of I/O >+ * queues to allocate per controller. >+ */ >+#define NVME_CEILING(num, div) ((((num) - 1) / (div)) + 1) >+ > >... I'm surprised that this isn't in , along with roundup()/rounddown()/etc. Finding the ceiling like this is probably pretty common, so shouldn't it be added to the common header so everyone can use it? -Ravi (rpokala@)