From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: "Shankarmurthy, Akshay" <akshay.s@ti.com>
Cc: "linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>,
"alan@linux.intel.com" <alan@linux.intel.com>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"paul.gortmaker@windriver.com" <paul.gortmaker@windriver.com>,
"jamie@jamieiles.com" <jamie@jamieiles.com>,
"swarren@nvidia.com" <swarren@nvidia.com>,
"dianders@chromium.org" <dianders@chromium.org>,
"davinci-linux-open-source@linux.davincidsp.com"
<davinci-linux-open-source@linux.davincidsp.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] serial: 8250: Add cpufreq support
Date: Thu, 5 Apr 2012 11:53:22 +0100 [thread overview]
Message-ID: <20120405115322.15e6088c@pyramind.ukuu.org.uk> (raw)
In-Reply-To: <6F6B80BD2E18844D97BB4B51FE3705C831790EA0@DBDE01.ent.ti.com>
On Thu, 5 Apr 2012 10:40:55 +0000
"Shankarmurthy, Akshay" <akshay.s@ti.com> wrote:
> Hi,
>
> On Tue, Apr 03, 2012 at 15:25:30, Alan Cox wrote:
> > > This patch was submitted 2 years ago but didn't make it to the mainline. Now i am reposting it.
> >
> > Can you fix it instead of just reposting it ?
> >
> >
> > > +#ifdef CONFIG_CPU_FREQ
> > > +static int serial8250_cpufreq_transition(struct notifier_block *nb,
> > > + unsigned long val, void *data)
> > > +{
> > > + struct uart_8250_port *p;
> > > + struct uart_port *uport;
> >
> > What is your locking model ?
> >
>
> I will have a look at this and add the lock if necessary.
At the very least you need reference counts held on the tty struct and to
allow for the tty having vanished under you.
> >
> > > +static inline void serial8250_cpufreq_deregister(struct uart_8250_port *p)
> >
> > unregister
>
> Ok. I will change it.
>
> >
> > > + ret = serial8250_cpufreq_register(uart);
> > > + if (ret < 0)
> > > + printk(KERN_ERR "Failed to add cpufreq notifier\n");
> >
> > Why do this for devices that don't care.
>
> This is taken care in the code. If the device's frequency doesn't change after the
> change in the cpu frequency then it doesn't go for execution of the function "serial8250_set_termios".
But you still call each function and walk the list for each port on each
CPU transition. There are people with 128 ports in their systems and the
cpu frequency change is latency critical.
Nothing should even be getting registered in such cases.
next prev parent reply other threads:[~2012-04-05 10:51 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-03 6:03 Shankarmurthy, Akshay
2012-04-03 9:55 ` Alan Cox
2012-04-05 10:40 ` Shankarmurthy, Akshay
2012-04-05 10:53 ` Alan Cox [this message]
2012-04-12 5:21 ` Shankarmurthy, Akshay
2012-04-12 9:47 ` Alan Cox
2012-04-17 9:43 ` Shankarmurthy, Akshay
2012-04-18 19:47 ` Alan Cox
-- strict thread matches above, loose matches on Subject: below --
2010-01-13 12:35 Chaithrika U S
2010-01-13 13:44 ` Alan Cox
2010-01-18 13:17 ` Chaithrika U S
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=20120405115322.15e6088c@pyramind.ukuu.org.uk \
--to=alan@lxorguk.ukuu.org.uk \
--cc=akshay.s@ti.com \
--cc=alan@linux.intel.com \
--cc=davinci-linux-open-source@linux.davincidsp.com \
--cc=dianders@chromium.org \
--cc=gregkh@linuxfoundation.org \
--cc=jamie@jamieiles.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=paul.gortmaker@windriver.com \
--cc=swarren@nvidia.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®