From: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
To: Willy Tarreau <willy@w.ods.org>
Cc: "Andrey J. Melnikoff (TEMHOTA)" <temnota@kmv.ru>,
linux-kernel@vger.kernel.org
Subject: Re: [2.4.28-rc1] process stuck in release_task() call
Date: Thu, 11 Nov 2004 06:01:02 -0200 [thread overview]
Message-ID: <20041111080102.GB15278@logos.cnet> (raw)
In-Reply-To: <20041111083312.GE783@alpha.home.local>
On Thu, Nov 11, 2004 at 09:33:12AM +0100, Willy Tarreau wrote:
> Hi Marcelo,
>
> > > >>EIP; c012073d <release_task+1fd/230> <=====
> (...)
> > > c0120540 <release_task>:
> > > c0120540: 55 push %ebp
> > > ....
> > > c0120736: 89 d8 mov %ebx,%eax
> > > c0120738: e8 73 dd 01 00 call c013e4b0 <free_pages> <= here
> >
> > is this release_task+1fd? Can you send me the full disassemble of release_task?
>
> Yes it is because the next instruction after call will be at c0120738+5 =
> c012073d = release_task+1fd. (the return address on the stack is the
> address of the next instruction after the call).
OK.
> > It can't be blocked here, its a "call" instruction.
>
> Seems rather strange indeed ! Perhaps this is not the disassembled function
> of the *running* kernel ? it would be good to disassemble vmlinux and ensure
> that it is exactly the one currently running. I too have already lost lots
> of time searching a wrong bug because I disassembled the wrong kernel, so
> I'm certain it can happen even when we're very careful :-(
>
> > free_pages can't block either. Odd.
>
> Marcelo, I have two questions for my own understanding :
> - free_pages does spin_lock(&zone->lock) around the while() loop.
> Considering that someone else could hold the lock (bug, etc...), it
> could block here. But my feeling is that if such a lock were kept held,
> the system would be totally frozen because everything which would want
> to free memory would get stuck (even a process exit). Am I right ?
Right, the system will be totally frozen spinning on the lock.
> - would it enhance performance a bit to put a bunch of 'unlikely()' in all
> the ifs which end in BUG(), especially inside the loop ?
Yes, it should generate better code.
Try it and see how the generated code differs from the original without unlikely.
I'm not aware of the internals of unlikely however, so I can't
explain how it works in details... the GCC documentation
should do it. :)
next prev parent reply other threads:[~2004-11-11 11:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-09 16:24 [2.4.28-rc1] process stuck in release_task() call Andrey J. Melnikoff (TEMHOTA)
2004-11-10 18:58 ` Marcelo Tosatti
2004-11-11 8:33 ` Willy Tarreau
2004-11-11 8:01 ` Marcelo Tosatti [this message]
[not found] ` <20041112135942.GW24130@kmv.ru>
[not found] ` <20041116100639.GA11948@logos.cnet>
2004-11-30 19:46 ` [RESOLVED] " Andrey J. Melnikoff (TEMHOTA)
2004-11-11 13:37 ` Andrey Melnikoff
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=20041111080102.GB15278@logos.cnet \
--to=marcelo.tosatti@cyclades.com \
--cc=linux-kernel@vger.kernel.org \
--cc=temnota@kmv.ru \
--cc=willy@w.ods.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.