lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 28 Sep 2010 08:25:24 +0800
From:	Ming Lei <tom.leiming@...il.com>
To:	Samuel Ortiz <sameo@...ux.intel.com>
Cc:	linux-omap@...r.kernel.org,
	Santosh Shilimkar <santosh.shilimkar@...com>,
	Balaji T K <balajitk@...com>, Rajendra Nayak <rnayak@...com>,
	Kevin Hilman <khilman@...prootsystems.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mfd: speedup twl4030 irq response time and decrease irq
 disable time

Hi Samuel,

     Thanks for your comment.

2010/9/27 Samuel Ortiz <sameo@...ux.intel.com>:
> Hi Tom,
>
> On Wed, Sep 22, 2010 at 09:49:31AM +0800, tom.leiming@...il.com wrote:
>> From: Ming Lei <tom.leiming@...il.com>
>>
>> This patch sets scheduler policy of twl4030 irq thread
>> (twl4030_irq_thread) as SCHED_FIFO to speedup irq response
>> time, just like taken by kernel threaded irq in irq_thread
>> (kernel/irq/manage.c). Also higher priority than that of
>> threaded irq is taken to avoid preemption from twl4030
>> subchips's threaded irq handler, so pih irq disable time may
>> be decreased.
> Wouldn't converting your twl4030_irq_thread() to the threaded IRQ framework
> fix that problem ?

IRQ_DISABLED flag is set by disable_irq_nosync called from PIH handler,
then thread function can't be executed in irq thread function, so we can't
convert this to threaded IRQ framework simply.

>
>> The pih irq is disabled in handle_twl4030_pih which may
>> wakeup twl4030 irq thread, and the pih irq will be enabled
>> again until complete of all sih irqs' handling in twl4030
>> irq thread.
>>
>> Also for each one interrupt line of twl4030 subchip, only
>> two irq events can be buffered by twl4030(4.4.2.3 of TPS65950 TRM).
> Could you explain how is that related to the patch below ?

We need to decrease PIH irq disable time as far as possible to
make twl4030 subchip happy, or else some irqs may be lost, right?

This patch will decrease PIH irq disable time:

        - set schedule policy of twl4030_irq_thread as SCHED_FIFO, so
it will get running timeslice quicker than before

       - set priority of  twl4030_irq_thread higher than irq_thread of
subchips to prevent it from being preempted by subchips' irq thread.


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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ