Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Jan 2016 12:17:17 -0800
From:      Conrad Meyer <cem@FreeBSD.org>
To:        Ravi Pokala <rpokala@mac.com>
Cc:        Jim Harris <jimharris@freebsd.org>, src-committers@freebsd.org,  svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r293328 - head/sys/dev/nvme
Message-ID:  <CAG6CVpU4UYYR80Mw1bKmCFhNrb6FH9rC4py8A7etTcnXVRxdOw@mail.gmail.com>
In-Reply-To: <6496C054-6FED-4B41-8EF8-8067E8B6C866@panasas.com>
References:  <201601071618.u07GIXdd054147@repo.freebsd.org> <6496C054-6FED-4B41-8EF8-8067E8B6C866@panasas.com>

next in thread | previous in thread | raw e-mail | index | archive | help
I believe it's spelled "howmany()."

On Thu, Jan 7, 2016 at 8:27 AM, Ravi Pokala <rpokala@mac.com> wrote:
> -----Original Message-----
>
>
> From: <owner-src-committers@freebsd.org> on behalf of Jim Harris <jimharris@FreeBSD.org>
> Date: 2016-01-07, Thursday at 08:18
> To: <src-committers@freebsd.org>, <svn-src-all@freebsd.org>, <svn-src-head@freebsd.org>
> 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 <sys/param.h>, 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@)
>
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAG6CVpU4UYYR80Mw1bKmCFhNrb6FH9rC4py8A7etTcnXVRxdOw>