patches for DPDK stable branches
 help / color / mirror / Atom feed
From: "Hunt, David" <david.hunt@intel.com>
To: Radoslaw Biernacki <radoslaw.biernacki@linaro.org>, dev@dpdk.org
Cc: stable@dpdk.org, alan.carew@intel.com, pablo.de.lara.guarch@intel.com
Subject: Re: [dpdk-stable] [PATCH 1/2] power: switching to unbuffered stdio for /sys file access
Date: Wed, 18 Oct 2017 11:33:56 +0100	[thread overview]
Message-ID: <9041e0ef-2ec7-a448-0676-71c4b59b67c0@intel.com> (raw)
In-Reply-To: <1508161628-4265-1-git-send-email-radoslaw.biernacki@linaro.org>

Hi Radoslaw,


On 16/10/2017 2:47 PM, Radoslaw Biernacki wrote:
> This patch fixes the bug caused by improper use of buffered
> stdio file access for switching the CPU frequency and
> governor. Each write operation when using buffered stdio
> must be flushed out and the return code from fflush() must
> be verified. In buffered mode, write() syscall return value
> is is not returned by fwrite()/fputs()/fprintf().
> Since with buffered approatch, fflush() need to be done
> every time it is better to use unbuffered mode or not use
> stdio at all (instead use plain open/write functions). To
> minimize amount of changes this fix use first approach.
>
> Signed-off-by: Radoslaw Biernacki <radoslaw.biernacki@linaro.org>
> ---
>   lib/librte_power/rte_power_acpi_cpufreq.c | 18 +++++++++++++++++-
>   1 file changed, 17 insertions(+), 1 deletion(-)
>
> diff --git a/lib/librte_power/rte_power_acpi_cpufreq.c b/lib/librte_power/rte_power_acpi_cpufreq.c
> index 01ac5ac..8bf5685 100644
> --- a/lib/librte_power/rte_power_acpi_cpufreq.c
> +++ b/lib/librte_power/rte_power_acpi_cpufreq.c
> @@ -143,12 +143,13 @@ set_freq_internal(struct rte_power_info *pi, uint32_t idx)
>   				"for setting frequency for lcore %u\n", pi->lcore_id);
>   		return -1;
>   	}
> +	/* we use unbuffered mode so following will fail if kernel will refuse
> +	 * freq setting */

Also, there's an issue with checkpatch on the comment here. Please make 
sure to run your patches through checkpatch. Typically a recent version 
of checkpatch should be used (4.1x).

Rgds,
Dave.


---snip---

  parent reply	other threads:[~2017-10-18 10:33 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-16 13:47 Radoslaw Biernacki
2017-10-16 13:47 ` [dpdk-stable] [PATCH 2/2] power: check if userspace governor is available Radoslaw Biernacki
2017-10-18 10:53   ` Hunt, David
2017-10-18 14:02     ` Radoslaw Biernacki
2017-10-18 10:28 ` [dpdk-stable] [PATCH 1/2] power: switching to unbuffered stdio for /sys file access Hunt, David
2017-10-18 10:33 ` Hunt, David [this message]
2017-10-18 13:56   ` Radoslaw Biernacki
2017-11-11 18:55 ` [dpdk-stable] [PATCH 0/3] power: fixes for power ACPI through sysfs Radoslaw Biernacki
2017-11-11 18:55   ` [dpdk-stable] [PATCH 1/3] power: removing code macros Radoslaw Biernacki
2017-11-11 18:55   ` [dpdk-stable] [PATCH 2/3] power: switching to unbuffered access for /sys files Radoslaw Biernacki
2017-11-23 14:42     ` Hunt, David
2017-12-01 21:01       ` Radoslaw Biernacki
2017-11-11 18:55   ` [dpdk-stable] [PATCH 3/3] power: check if userspace governor is available Radoslaw Biernacki
2017-11-21 11:09   ` [dpdk-stable] [PATCH 0/3] power: fixes for power ACPI through sysfs Radoslaw Biernacki

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=9041e0ef-2ec7-a448-0676-71c4b59b67c0@intel.com \
    --to=david.hunt@intel.com \
    --cc=alan.carew@intel.com \
    --cc=dev@dpdk.org \
    --cc=pablo.de.lara.guarch@intel.com \
    --cc=radoslaw.biernacki@linaro.org \
    --cc=stable@dpdk.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).