Re: [patch 03/41] cpu alloc: Use cpu allocator instead of the builtin modules per cpu allocator



On Thu, 29 May 2008, Andrew Morton wrote:

+ printk(KERN_WARNING "%s: per-cpu alignment %li > %li\n",
+ mod->name, align, PAGE_SIZE);

Indenting broke.

Hmmm. Okay.

Alas, PAGE_SIZE has, iirc, unsigned type on some architectures and
unsigned long on others. I suspect you'll need to cast it to be able
to print it.

This is code that was moved.

+ percpu = cpu_alloc(size, GFP_KERNEL|__GFP_ZERO, align);
+ if (!percpu)
+ printk(KERN_WARNING "Could not allocate %lu bytes percpu data\n",

80-col bustage,.

A printk like this should, I think, identify what part of the kernel it
came from.

Again moved code. Should I really do string separations for code
that is moved?

But really, I don't think any printk should be present here.
cpu_alloc() itself should dump the warning and the backtrace when it
runs out. Because a cpu_alloc() failure is a major catastrophe. It
probably means a reconfigure-and-reboot cycle.

The code has been able to deal with an allocpercpu failure in the
past. Why would it have trouble with a cpu_alloc failure here?

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



Relevant Pages

  • Re: Goodnight Moon...
    ... Derek and I are quibbling over the odds. ... Derek gives success as likely ... an outcome as failure. ... I suspect that even without the later budget cuts, ...
    (sci.space.policy)
  • Re: Total wheel Failure
    ... I believe that the first failure was the short break, and I suspect ... the rim separated while rotating, one end jammed on a seat stay (I ... see how that would create the diagonal tear across the rim anchored at ...
    (rec.bicycles.tech)
  • Re: Goodnight Moon...
    ... Derek and I are quibbling over the odds. ... Derek gives success as likely ... an outcome as failure. ... I would suspect that given a decade or so of ...
    (sci.space.policy)
  • Re: Another post about schools...
    ... motherhood. ... Your feeling shows and I suspect you are proud of it. ... You don't have the franchise on failure. ...
    (rec.sport.football.college)
  • Re: Absolute Max
    ... Is that essetially the threshold for failure for reduced ... If 30mA is the absolute max for an LED, will running it at 25mA max(lets ... but I suspect that although there may be some new additions to the ... An equal right to an opinion isn't a right to an equal opinion. ...
    (sci.electronics.design)