public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Nadia Derbey <Nadia.Derbey@bull.net>
To: Manfred Spraul <manfred@colorfullife.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/4] ipc/sem.c: convert undo structures to struct list_head
Date: Mon, 09 Jun 2008 08:56:06 +0200	[thread overview]
Message-ID: <484CD406.9080607@bull.net> (raw)
In-Reply-To: <484A9FAB.5090202@colorfullife.com>

Manfred Spraul wrote:
> Nadia Derbey wrote:
> 
>> Manfred Spraul wrote:
>>
>>> The undo structures contain two linked lists, the
>>> attached patch replaces them with generic struct list_head lists.
>>
>>
>> If I'm not wrong the undo list is a singly-linked list.
>> So here we are moving from a set of 4 pointers to a set of 8 pointers.
>> It's true that this makes the code much much more readable and clear, 
>> but I was wondering if it's worth?
>>
> IMHO yes: Everything is allocated on demand and memory is not that 
> expensive.
> 
> With regard to the asserts: I'm a big fan of asserts, I usually use them 
> to document the locking.

And you're completely right: when I see your new semaphore code, we can 
easily see what is the lock needed to protect a given field.

> Perhaps assert_spin_locked() should evalute to a nop() for 
> non-CONFIG_DEBUG builds?

Well, it's unconditionally defined as a BUG_ON(!spin_is_locked())

Regards,
Nadia





      reply	other threads:[~2008-06-09  6:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-24 11:20 [PATCH 1/4] ipc/sem.c: convert undo structures to struct list_head Manfred Spraul
2008-05-29 15:00 ` Nadia Derbey
2008-06-07 14:48   ` Manfred Spraul
2008-06-09  6:56     ` Nadia Derbey [this message]

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=484CD406.9080607@bull.net \
    --to=nadia.derbey@bull.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manfred@colorfullife.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