All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fengguang Wu <fengguang.wu@intel.com>
To: lkp@lists.01.org
Subject: Re: [clockevents] d5a085970b0: -9.2% will-it-scale.per_thread_ops
Date: Thu, 26 Jun 2014 12:39:21 +0800	[thread overview]
Message-ID: <20140626043921.GC17188@localhost> (raw)
In-Reply-To: <CAKohpomKX69qLMgUBJpi1H-mxtkqSDCDn4J5V65+n03Lj1iOsQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 682 bytes --]

On Thu, Jun 26, 2014 at 09:35:11AM +0530, Viresh Kumar wrote:
> On 26 June 2014 07:16, Fengguang Wu <fengguang.wu@intel.com> wrote:
> > I'm not sure how the simple commit will impact will-it-scale/pwrite2
> > throughput. Just in case you can see more clues.
> >
> > git://git.linaro.org/people/vireshk/linux tick/ONESHOT-STOPPED
> > commit d5a085970b0b88b8c82303d2c45f09c9427fd02a ("clockevents: x86: add support for ONESHOT_STOPPED mode")
> >
> > test case: nhm4/will-it-scale/pwrite2
> 
> What is this test all about ?

It calls the pwrite2() syscall in parallel, on one single tmpfs file.

https://github.com/antonblanchard/will-it-scale.git

Thanks,
Fengguang

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: pwrite2.c --]
[-- Type: text/x-csrc, Size: 700 bytes --]

#define _XOPEN_SOURCE 500
#include <fcntl.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <assert.h>

#define BUFLEN 4096

static char tmpfile[] = "/tmp/willitscale.XXXXXX";

char *testcase_description = "Same file pwrite";

void testcase_prepare(void)
{
	char buf[BUFLEN];
	int fd = mkstemp(tmpfile);

	memset(buf, 0, sizeof(buf));
	assert(fd >= 0);
	assert(write(fd, buf, sizeof(buf)) == sizeof(buf));
	close(fd);
}

void testcase(unsigned long long *iterations)
{
	char buf[BUFLEN];
	int fd = open(tmpfile, O_RDWR);

	assert(fd >= 0);

	while (1) {
		assert(pwrite(fd, buf, BUFLEN, 0) == BUFLEN);

		(*iterations)++;
	}
}

void testcase_cleanup(void)
{
	unlink(tmpfile);
}

  reply	other threads:[~2014-06-26  4:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-26  1:46 [clockevents] d5a085970b0: -9.2% will-it-scale.per_thread_ops Fengguang Wu
2014-06-26  4:05 ` Viresh Kumar
2014-06-26  4:39   ` Fengguang Wu [this message]
2014-06-26 11:07 ` Viresh Kumar
2014-06-26 21:11 ` Dave Hansen

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=20140626043921.GC17188@localhost \
    --to=fengguang.wu@intel.com \
    --cc=lkp@lists.01.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.