From: Alexander Stein <alexander.stein@systec-electronic•com>
To: Timur Tabi <timur@tabi•org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation•org>,
Jiri Slaby <jslaby@suse•com>,
linuxppc-dev@lists•ozlabs.org, linux-serial@vger•kernel.org
Subject: Re: [PATCH 1/1] serial/uuc_uart: Set shutdown timeout to CONFIG_HZ independent 2ms
Date: Tue, 06 Dec 2016 08:36:22 +0100 [thread overview]
Message-ID: <18303458.zhjk47K7B1@ws-stein> (raw)
In-Reply-To: <5845900B.5010108@tabi.org>
On Monday 05 December 2016 10:04:27, Timur Tabi wrote:
> Alexander Stein wrote:
> > - schedule_timeout(2);
> > + schedule_timeout(msecs_to_jiffies(2));
>
> NACK.
>
> So I don't remember why I wrote this code, but I don't think I was
> expecting it to be 2ms. Instead, I think I just wanted it to be some
> delay, but I believed that schedule_timeout(1) was too short or would be
> "optimized" out somehow.
>
> Note that right below this, I do:
>
> if (qe_port->wait_closing) {
> /* Wait a bit longer */
> set_current_state(TASK_UNINTERRUPTIBLE);
> schedule_timeout(qe_port->wait_closing);
> }
>
> And wait_closing is a number of jiffies, so I knew that
> schedule_timeout() took jiffies as a parameter.
>
> So I think I'm going to NACK this patch, since I believe I knew what I
> was doing when I wrote it five years ago.
Okay, I was just wondering why the timeout is dependant on the timer tick.
That didn't seem obvious to me.
Rethinking about this, I would rather replace those lines with msleep instead.
Best regards,
Alexander
next prev parent reply other threads:[~2016-12-06 7:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-05 15:50 [PATCH 1/1] serial/uuc_uart: Set shutdown timeout to CONFIG_HZ independent 2ms Alexander Stein
2016-12-05 16:04 ` Timur Tabi
2016-12-06 7:36 ` Alexander Stein [this message]
2016-12-06 13:35 ` Timur Tabi
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=18303458.zhjk47K7B1@ws-stein \
--to=alexander.stein@systec-electronic$(echo .)com \
--cc=gregkh@linuxfoundation$(echo .)org \
--cc=jslaby@suse$(echo .)com \
--cc=linux-serial@vger$(echo .)kernel.org \
--cc=linuxppc-dev@lists$(echo .)ozlabs.org \
--cc=timur@tabi$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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