lkml.org 
[lkml]   [2007]   [Jul]   [11]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateWed, 11 Jul 2007 03:47:09 +0530 (IST)
FromSatyam Sharma <>
SubjectRe: [PATCH v2 -mm 8/9] netconsole: Support multiple logging targets
Hi,

On Tue, 10 Jul 2007, Duane Griffin wrote:
> On 10/07/07, Satyam Sharma <ssatyam@cse.iitk.ac.in> wrote:
> > +       /* Avoid taking lock and disabling interrupts unnecessarily */
> > +       if (unlikely(list_empty(&target_list)))
> > +               return;
> 
> Is the unlikely a good idea here? Not having any targets may be
> unusual but it isn't ridiculous. It might even be a sensible default
> for distros.

Hmm, I put it in there because I expected that the user must have had
at least one target configured (added to target_list) if he's got the
module loaded/built-in (and netconsole registered), which is when this
function would be triggered anyway.

> My (very limited) understanding of unlikely is that it
> could impose a very large penalty in that case and would make a very
> marginal difference at best in the common case.

I wouldn't call it a large penalty, but yeah, probably the unlikely()
there isn't all that important either.

Satyam
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-07-11 06:07    [from the cache]
©2003-2008