From: Jens Axboe <axboe@kernel.dk>
To: Yufei Ren <yufei.ren@stonybrook.edu>
Cc: fio@vger.kernel.org, Yufei Ren <renyufei83@gmail.com>
Subject: Re: [PATCH] Replace FIO_HAVE_RUSAGE_THREAD with RUSAGE_THREAD
Date: Wed, 24 Oct 2012 08:29:56 +0200 [thread overview]
Message-ID: <50878AE4.7090900@kernel.dk> (raw)
In-Reply-To: <1350955778-27682-1-git-send-email-yufei.ren@stonybrook.edu>
On 2012-10-23 03:29, Yufei Ren wrote:
> From: Yufei Ren <renyufei83@gmail.com>
>
> RUSAGE_THREAD is a more clear macro to enable getrusage() thread support.
> ---
> os/os-linux.h | 5 -----
> stat.c | 2 +-
> 2 files changed, 1 insertions(+), 6 deletions(-)
>
> diff --git a/os/os-linux.h b/os/os-linux.h
> index 2b35f34..9b7ff29 100644
> --- a/os/os-linux.h
> +++ b/os/os-linux.h
> @@ -14,7 +14,6 @@
> #include <linux/unistd.h>
> #include <linux/raw.h>
> #include <linux/major.h>
> -#include <linux/version.h>
> #include <endian.h>
>
> #include "indirect.h"
> @@ -63,10 +62,6 @@
> #define FIO_HAVE_FALLOC_ENG
> #endif
>
> -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
> -#define FIO_HAVE_RUSAGE_THREAD
> -#endif
> -
> #ifdef SYNC_FILE_RANGE_WAIT_BEFORE
> #define FIO_HAVE_SYNC_FILE_RANGE
> #endif
> diff --git a/stat.c b/stat.c
> index af6e1f2..522901a 100644
> --- a/stat.c
> +++ b/stat.c
> @@ -16,7 +16,7 @@ void update_rusage_stat(struct thread_data *td)
> {
> struct thread_stat *ts = &td->ts;
>
> -#ifdef FIO_HAVE_RUSAGE_THREAD
> +#ifdef RUSAGE_THREAD
> getrusage(RUSAGE_THREAD, &td->ru_end);
> #else
> getrusage(RUSAGE_SELF, &td->ru_end);
>
Thanks, applied!
--
Jens Axboe
prev parent reply other threads:[~2012-10-24 6:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-23 1:29 [PATCH] Replace FIO_HAVE_RUSAGE_THREAD with RUSAGE_THREAD Yufei Ren
2012-10-23 1:29 ` [PATCH] rdma ioengine improvement Yufei Ren
2012-10-24 6:37 ` Jens Axboe
2012-10-24 6:29 ` Jens Axboe [this message]
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=50878AE4.7090900@kernel.dk \
--to=axboe@kernel.dk \
--cc=fio@vger.kernel.org \
--cc=renyufei83@gmail.com \
--cc=yufei.ren@stonybrook.edu \
/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