From owner-svn-src-head@freebsd.org Thu Jan 7 20:25:30 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 D56DEA67F42; Thu, 7 Jan 2016 20:25:30 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-yk0-f180.google.com (mail-yk0-f180.google.com [209.85.160.180]) (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 9B6AE10CF; Thu, 7 Jan 2016 20:25:30 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-yk0-f180.google.com with SMTP id x67so341988855ykd.2; Thu, 07 Jan 2016 12:25:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=6BIHxZJRs1h48XI1LufgeOmoEqrM6G0R0roELwKPUg0=; b=BC01pBUWticvmvkGGyACvwHGgXQVg2HPdGLanIP+/qzjcmx/u1tacAguuUK/ZY5suE /dSuP7xDAlXPxwYnX465R5v6zKNWdAoruEPOa/kTd3SDUrgyW9Bh2LQePq8uEtCtwCVq tcIvqMcwWfZMwR0FvCiey8Kmw106Bc5vQ8/K42tXP4bnBkYeJfxNzgO5dja0oG+HtZsg kmoreislM26SAEYEPg+4dMXlW2GEh03FzkTTXb12qAx+v5njDmxEELo+9SBq4j0/pLtF qb8INaHlBli/sorblEayUjDTQ72eEuiaMvTYfFq1zQMRlIaqSO0bAQgNDHun6vErAvkm HkoA== X-Received: by 10.129.54.16 with SMTP id d16mr77304975ywa.41.1452197837801; Thu, 07 Jan 2016 12:17:17 -0800 (PST) Received: from mail-yk0-f178.google.com (mail-yk0-f178.google.com. [209.85.160.178]) by smtp.gmail.com with ESMTPSA id t128sm85909135ywa.55.2016.01.07.12.17.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Jan 2016 12:17:17 -0800 (PST) Received: by mail-yk0-f178.google.com with SMTP id k129so319100533yke.0; Thu, 07 Jan 2016 12:17:17 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.129.153.129 with SMTP id q123mr87933925ywg.281.1452197837245; Thu, 07 Jan 2016 12:17:17 -0800 (PST) Reply-To: cem@FreeBSD.org Received: by 10.37.4.69 with HTTP; Thu, 7 Jan 2016 12:17:17 -0800 (PST) In-Reply-To: <6496C054-6FED-4B41-8EF8-8067E8B6C866@panasas.com> References: <201601071618.u07GIXdd054147@repo.freebsd.org> <6496C054-6FED-4B41-8EF8-8067E8B6C866@panasas.com> Date: Thu, 7 Jan 2016 12:17:17 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r293328 - head/sys/dev/nvme From: Conrad Meyer To: Ravi Pokala Cc: Jim Harris , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 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 20:25:30 -0000 I believe it's spelled "howmany()." On Thu, Jan 7, 2016 at 8:27 AM, Ravi Pokala wrote: > -----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@) > >