mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Om Narasimhan" <om.turyx@gmail.com>
To: "Dmitry Torokhov" <dmitry.torokhov@gmail.com>
Cc: "Paulo Marques" <pmarques@grupopie.com>,
	"Pekka Enberg" <penberg@cs.helsinki.fi>,
	"Jiri Slaby" <jirislaby@gmail.com>,
	linux-kernel@vger.kernel.org, kernel-janitors@lists.osdl.org
Subject: Re: [KJ] kmalloc to kzalloc patches for drivers/block [sane version]
Date: Fri, 22 Sep 2006 15:55:10 -0700	[thread overview]
Message-ID: <6b4e42d10609221555i721bef48m847a4d85ec0a080c@mail.gmail.com> (raw)
In-Reply-To: <d120d5000609220645h3bdd2941p711c7419b50c6ea4@mail.gmail.com>

> I think the we should follow a rule like this: when allocating several
> separate objects of the same type at the same time (like 10 "card"
> structures) kcalloc should be used. When allocating one object (even
> consisting of "several ints") kmalloc/kzalloc should be used. As far
> as I can see the code just tries to allocate longish bitmap and so
> kzalloc is better.
>
> Better yet, why don't you DECLARE_BITMAP(cmd_pool_bits) and embed it
> right into struct ctrl_info instead of dynamically allocating it?
hba is decalred as
static ctlr_info_t *hba[MAX_CTLR]
So if I change the cmd_pool_bits to embed the DECLARE_BITMAP
statement, while compiling this file as a module, is there not a
chance of cmd_pool_bits cross a page boundary and allocated in two non
contiguous (physical) pages? Would it cause a problem with
__find_fist_zero_bit() and friends?
Regards,
Om.

  reply	other threads:[~2006-09-22 22:55 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-21  6:11 Om Narasimhan
2006-09-21  7:20 ` [KJ] " Nishanth Aravamudan
2006-09-22  5:40   ` Om Narasimhan
2006-09-22  6:04     ` Om Narasimhan
2006-09-22  8:43       ` Jiri Slaby
2006-09-22 11:32         ` Paulo Marques
2006-09-22 12:03           ` Pekka Enberg
2006-09-22 13:03             ` Paulo Marques
2006-09-22 13:45               ` Dmitry Torokhov
2006-09-22 22:55                 ` Om Narasimhan [this message]
2006-09-22  8:36     ` Jiri Slaby
2006-09-22 11:28       ` Paulo Marques

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6b4e42d10609221555i721bef48m847a4d85ec0a080c@mail.gmail.com \
    --to=om.turyx@gmail.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=jirislaby@gmail.com \
    --cc=kernel-janitors@lists.osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=penberg@cs.helsinki.fi \
    --cc=pmarques@grupopie.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome