From owner-svn-src-all@freebsd.org Thu Jan 7 20:20:43 2016 Return-Path: Delivered-To: svn-src-all@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 BF5BCA67D64; Thu, 7 Jan 2016 20:20:43 +0000 (UTC) (envelope-from jim.harris@gmail.com) Received: from mail-io0-x229.google.com (mail-io0-x229.google.com [IPv6:2607:f8b0:4001:c06::229]) (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 904B618E2; Thu, 7 Jan 2016 20:20:43 +0000 (UTC) (envelope-from jim.harris@gmail.com) Received: by mail-io0-x229.google.com with SMTP id g73so66562908ioe.3; Thu, 07 Jan 2016 12:20:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=NxgxOxkIqQCmFz4kZMu4oThiXJg7CMi0eBBp0yUc8+k=; b=AmxFXsT/DTbULMeFUrwvZXaHIyiJNfpDHhFhpHl7qcyLIFaRjGte3XQXZianTfQ4IZ /bKec4m2DVMocw7EnnoPbksfv/30vx0HLksG5G/Gm2pdXTTGhbcUK3rZZGQi5ZbwnGcf m48wwroH+aEfQ/sRbMz8B2TPZDBCR7UScONkXETd2XBpVpDdT4/azaIe5GfZVNhWyWZH FnGJUm56sKzoEJNYw9VCUNd4Ht0ZcmgIqvc4OSyVooNl4iW+VCLQlLstusubJkuGd5dk VEabj09J22p1PP87P/XjwfIZrHWgSM36bR531aTG6nhw+TyQ6zH1TjsAke+lIK+kQazh 6w/A== MIME-Version: 1.0 X-Received: by 10.107.184.67 with SMTP id i64mr112685587iof.4.1452198042906; Thu, 07 Jan 2016 12:20:42 -0800 (PST) Received: by 10.64.241.228 with HTTP; Thu, 7 Jan 2016 12:20:42 -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 13:20:42 -0700 Message-ID: Subject: Re: svn commit: r293328 - head/sys/dev/nvme From: Jim Harris To: Ravi Pokala Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jan 2016 20:20:43 -0000 On Thu, Jan 7, 2016 at 9:27 AM, Ravi Pokala wrote: > -----Original Message----- > > > From: on behalf of Jim Harris > > Date: 2016-01-07, Thursday at 08:18 > To: , , < > 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 , 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? > Good catch. howmany() does exactly this, just expressed differently. I'll switch over to that. Thanks! -Jim > > -Ravi (rpokala@) > >