From: Ivo Sieben <meltedpianoman@gmail.com>
To: Greg KH <gregkh@linuxfoundation.org>,
linux-serial@vger.kernel.org, Alan Cox <alan@linux.intel.com>,
RT <linux-rt-users@vger.kernel.org>
Cc: Ivo Sieben <meltedpianoman@gmail.com>
Subject: Re: [PATCH 1/3] RFC: Solved unnecessary schedule latency in the TTY layer (1/3)
Date: Mon, 7 May 2012 16:10:15 +0200 [thread overview]
Message-ID: <CAMSQXEEczyknnRaPhktaDj3e6GPCo6YpVFC-Nczk6uDpO6-ytA@mail.gmail.com> (raw)
In-Reply-To: <1336048663-21882-1-git-send-email-meltedpianoman@gmail.com>
Hi,
2012/5/3 Ivo Sieben <meltedpianoman@gmail.com>:
> --- a/drivers/tty/tty_buffer.c
> +++ b/drivers/tty/tty_buffer.c
> @@ -317,12 +317,7 @@ EXPORT_SYMBOL(tty_insert_flip_string_flags);
>
> void tty_schedule_flip(struct tty_struct *tty)
> {
> - unsigned long flags;
> - spin_lock_irqsave(&tty->buf.lock, flags);
> - if (tty->buf.tail != NULL)
> - tty->buf.tail->commit = tty->buf.tail->used;
> - spin_unlock_irqrestore(&tty->buf.lock, flags);
> - schedule_work(&tty->buf.work);
> + tty_flip_buffer_push(tty);
> }
> EXPORT_SYMBOL(tty_schedule_flip);
>
I have an additional question on the above change in the patch that I've send:
I found that two functions in drivers/tty/tty_buffer.c implement
almost the same functionality:
- tty_schedule_flip
- tty_flip_buffer_push
Only difference was that tty_schedule_flip() always uses the work
queue, while the tty_flip_buffer_push only uses the work queue in case
of a non prempt_rt system and low_latency flag unset.
But is my change correct? I see that most serial drivers use the
tty_flip_buffer_push() function. But still a number of drivers use the
tty_schedule_flip() function. I even found one driver that uses both
(drivers/staging/serqt_usb2/serqt_usb2.c). Does my patch introduce
bugs to these drivers? Or is the tty_schedule_flip() a legacy
function, and would it be better to remove it completely?
Regards,
Ivo Sieben
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2012-05-07 14:10 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-03 12:37 [PATCH 1/3] RFC: Solved unnecessary schedule latency in the TTY layer (1/3) Ivo Sieben
2012-05-03 12:37 ` [PATCH 2/3] RFC: Solved unnecessary schedule latency in the TTY layer (2/3) Ivo Sieben
2012-05-03 16:25 ` Greg KH
2012-05-07 7:45 ` Ivo Sieben
2012-05-03 12:37 ` [PATCH 3/3] RFC: Solved unnecessary schedule latency in the TTY layer (3/3) Ivo Sieben
2012-05-03 16:24 ` Greg KH
2012-05-10 15:28 ` Alan Cox
2012-05-07 14:10 ` Ivo Sieben [this message]
2012-05-10 15:26 ` [PATCH 1/3] RFC: Solved unnecessary schedule latency in the TTY layer (1/3) Alan Cox
2012-05-14 12:25 ` Ivo Sieben
2012-05-15 15:04 ` Steven Rostedt
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=CAMSQXEEczyknnRaPhktaDj3e6GPCo6YpVFC-Nczk6uDpO6-ytA@mail.gmail.com \
--to=meltedpianoman@gmail.com \
--cc=alan@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=linux-serial@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).