public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Karsten Keil <kkeil@suse.de>
To: David Woodhouse <dwmw2@infradead.org>
Cc: isdn4linux@listserv.isdn4linux.de,
	Marcel Holtmann <marcel@holtmann.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mISDN cleanup user interface
Date: Wed, 30 Jul 2008 19:51:38 +0200	[thread overview]
Message-ID: <20080730175138.GA12800@pingi.kke.suse.de> (raw)
In-Reply-To: <1217437021.3454.8.camel@pmac.infradead.org>

On Wed, Jul 30, 2008 at 05:57:01PM +0100, David Woodhouse wrote:
> On Wed, 2008-07-30 at 18:33 +0200, Karsten Keil wrote:
> > What about this implementation ?
> 
> Looks a lot saner... although it does seem to confirm my earlier
> suspicion that you're not even _using_ the fact that it's a bitmap at
> all. You set the bits for the present channels at init time, which are
> always contiguous, and you never seem to change them them later -- why
> couldn't you do this with a simple 'number of channels' integer?

No it is not contineous on different PRI line setups (E1,T1 ...)
e.g a E1 has the D-channel on channel 15 position, so this bit is not set
then. My idea was, that with such a bitmap, applictions do not need to know
anything about the different channel layouts, it can use the map as base to assign
or validate a channel numbers.

> 
> Are you later intending to use the bitmap to mark them as busy/free?
> 

Yes exactely, and this was the reason why the original code (which used one u_long
only as channelmap) already used the bit operators, since for a channel allocator
you should be atomic, but since we are now allow 127 channels we need proper
locking for the busy/free map anyways and so we do not need atomic operation
here.

-- 
Karsten Keil
SuSE Labs
ISDN and VOIP development
SUSE LINUX Products GmbH, Maxfeldstr.5 90409 Nuernberg, GF: Markus Rex, HRB 16746 (AG Nuernberg)

  reply	other threads:[~2008-07-30 17:52 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-29 19:56 [PATCH] mISDN cleanup user interface Karsten Keil
2008-07-29 20:22 ` David Woodhouse
2008-07-29 21:02   ` Marcel Holtmann
2008-07-30  9:13     ` David Woodhouse
2008-07-30 16:33       ` Karsten Keil
2008-07-30 16:57         ` David Woodhouse
2008-07-30 17:51           ` Karsten Keil [this message]
2008-07-30 18:37             ` Sam Ravnborg
2008-07-30 18:46               ` Karsten Keil
2008-07-30 19:08             ` David Woodhouse
2008-07-30 15:08   ` Karsten Keil
2008-08-01 17:21 ` Linus Torvalds
2008-08-02 15:21   ` Karsten Keil

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=20080730175138.GA12800@pingi.kke.suse.de \
    --to=kkeil@suse.de \
    --cc=dwmw2@infradead.org \
    --cc=isdn4linux@listserv.isdn4linux.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcel@holtmann.org \
    --cc=torvalds@linux-foundation.org \
    /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