| To: | Atsushi Nemoto <anemo@mba.ocn.ne.jp> |
|---|---|
| Subject: | Re: [PATCH] Remove mfinfo[64] used by get_wchan() |
| From: | Franck Bui-Huu <vagabon.xyz@gmail.com> |
| Date: | Fri, 18 Aug 2006 09:50:57 +0200 |
| Cc: | vagabon.xyz@gmail.com, ralf@linux-mips.org, linux-mips@linux-mips.org |
| Domainkey-signature: | a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:reply-to:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding:from; b=TkFroIJEZbmoLEet4zrwMqgZiotBjGSO5N+hfLdJUa9aGsLwIrn1wiRJ7mhIB2j/4kHsgHwh+pHJbkpoKWCmhpUlgEPNTexCvEaIkOL4GfIYKKRAbUOJSVW8BsJPR0nn07V/e+wspTPoTCDsxOrsssjEh+ym3luu3T0y/XLKn4w= |
| In-reply-to: | <20060818.115213.108739385.nemoto@toshiba-tops.co.jp> |
| Original-recipient: | rfc822;linux-mips@linux-mips.org |
| References: | <44E475C8.5000105@innova-card.com> <20060818.115213.108739385.nemoto@toshiba-tops.co.jp> |
| Reply-to: | Franck <vagabon.xyz@gmail.com> |
| Sender: | linux-mips-bounce@linux-mips.org |
| User-agent: | Thunderbird 1.5.0.4 (X11/20060614) |
Atsushi Nemoto wrote:
> On Thu, 17 Aug 2006 15:57:28 +0200, Franck Bui-Huu <vagabon.xyz@gmail.com>
> wrote:
>> This array was used to 'cache' some frame info about scheduler
>> functions to speed up get_wchan(). This array was 1Ko size and
>> was only used when CONFIG_KALLSYMS was set but declared for all
>> configs.
>>
>> Rather than make the array statement conditional, this patches
>> removes this array and its uses. Indeed the common case doesn't
>> seem to use this array and get_wchan() is not a critical path
>> anyways.
>
> It looks good basically, but a few fixes are required.
>
>> static int __init frame_info_init(void)
>> {
>> - int i;
>> + unsigned long size = 0;
>
> You must pass some non-zero size even if CONFIG_KALLSYMS was not set.
> Otherwise schedule_mfi will not be initialized as expected. Actually,
> this is not a problem of this patch, but we missed this point on
> previous cleanups for the get_frame_info()...
>
or maybe we can just fix get_frame_info() and make it more robust ?
>> +unsigned long get_wchan(struct task_struct *task)
>> +{
>> + unsigned long stack_page = (unsigned long)task_stack_page(task);
>
> This should be done after "if (!task ..." check.
>
>> + unsigned long pc = 0;
>> +#ifdef CONFIG_KALLSYMS
>> + unsigned long sp = task->thread.reg29;
>
> Same. And you missed one stack level.
>
> sp = task->thread.reg29 + schedule_mfi.frame_size;
>
Absolutely. I'll cook up a new patch and will send it today.
Thanks
Franck
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [PATCH] Remove mfinfo[64] used by get_wchan(), Atsushi Nemoto |
|---|---|
| Next by Date: | Re: [PATCH] Remove mfinfo[64] used by get_wchan(), Atsushi Nemoto |
| Previous by Thread: | Re: [PATCH] Remove mfinfo[64] used by get_wchan(), Atsushi Nemoto |
| Next by Thread: | Re: [PATCH] Remove mfinfo[64] used by get_wchan(), Atsushi Nemoto |
| Indexes: | [Date] [Thread] [Top] [All Lists] |