All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <jaxboe@fusionio.com>
To: linux-btrace@vger.kernel.org
Subject: Recent changes
Date: Thu, 10 Feb 2011 05:00:04 +0000	[thread overview]
Message-ID: <20110210050004.5732D37A2C9@kernel.dk> (raw)
In-Reply-To: <46171742.iJ5w/0J1D3Q4P+M6%jens.axboe@oracle.com>

The following changes since commit b7e74b0087fe5d687c6a43a01a2e02d60b618ae0:

  blkiomon: Fix an output error (2011-01-14 09:06:03 +0100)

are available in the git repository at:
  git://git.kernel.dk/blktrace.git master

Tao Ma (3):
      blktrace: break mlock in case of is_done.
      blktrace: remove unused idx from devpath.
      gitignore: add blkiomon to .gitignore.

 .gitignore |    3 +++
 blktrace.c |   25 +++++++++++++++++--------
 2 files changed, 20 insertions(+), 8 deletions(-)

---

Diff of recent changes:

diff --git a/.gitignore b/.gitignore
index 9038778..2436e34 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,6 +3,9 @@
 blkparse
 blktrace
 blkrawverify
+blkiomon
+btreplay/btrecord
+btreplay/btreplay
 doc/.depend
 verify_blkparse
 btt/btt
diff --git a/blktrace.c b/blktrace.c
index 4cccb7c..18c5157 100644
--- a/blktrace.c
+++ b/blktrace.c
@@ -93,7 +93,7 @@ struct devpath {
 	char *path;			/* path to device special file */
 	char *buts_name;		/* name returned from bt kernel code */
 	struct pdc_stats *stats;
-	int fd, idx, ncpus;
+	int fd, ncpus;
 	unsigned long long drops;
 
 	/*
@@ -721,18 +721,24 @@ static void *my_mmap(void *addr, size_t length, int prot, int flags, int fd,
 	return new;
 }
 
-static int my_mlock(const void *addr, size_t len)
+static int my_mlock(struct tracer *tp,
+		    const void *addr, size_t len)
 {
-	int ret;
+	int ret, retry = 0;
 
 	do {
 		ret = mlock(addr, len);
+		if ((retry >= 10) && tp && tp->is_done)
+			break;
+		retry++;
 	} while (ret < 0 && handle_mem_failure(len));
 
 	return ret;
 }
 
-static int setup_mmap(int fd, unsigned int maxlen, struct mmap_info *mip)
+static int setup_mmap(int fd, unsigned int maxlen,
+		      struct mmap_info *mip,
+		      struct tracer *tp)
 {
 	if (mip->fs_off + maxlen > mip->fs_buf_len) {
 		unsigned long nr = max(16, mip->buf_nr);
@@ -759,7 +765,10 @@ static int setup_mmap(int fd, unsigned int maxlen, struct mmap_info *mip)
 			perror("setup_mmap: mmap");
 			return 1;
 		}
-		my_mlock(mip->fs_buf, mip->fs_buf_len);
+		if (my_mlock(tp, mip->fs_buf, mip->fs_buf_len) < 0) {
+			perror("setup_mlock: mlock");
+			return 1;
+		}
 	}
 
 	return 0;
@@ -1239,7 +1248,7 @@ static int add_devpath(char *path)
 	memset(dpp, 0, sizeof(*dpp));
 	dpp->path = strdup(path);
 	dpp->fd = fd;
-	dpp->idx = ndevs++;
+	ndevs++;
 	list_add_tail(&dpp->head, &devpaths);
 
 	return 0;
@@ -1683,7 +1692,7 @@ static int handle_pfds_file(struct tracer *tp, int nevs, int force_read)
 		if (pfd->revents & POLLIN || force_read) {
 			mip = &iop->mmap_info;
 
-			ret = setup_mmap(iop->ofd, buf_size, mip);
+			ret = setup_mmap(iop->ofd, buf_size, mip, tp);
 			if (ret < 0) {
 				pfd->events = 0;
 				break;
@@ -2381,7 +2390,7 @@ static void net_client_read_data(struct cl_conn *nc, struct devpath *dpp,
 	struct io_info *iop = &dpp->ios[bnh->cpu];
 	struct mmap_info *mip = &iop->mmap_info;
 
-	if (setup_mmap(iop->ofd, bnh->len, &iop->mmap_info)) {
+	if (setup_mmap(iop->ofd, bnh->len, &iop->mmap_info, NULL)) {
 		fprintf(stderr, "ncd(%s:%d): mmap failed\n",
 			nc->ch->hostname, nc->fd);
 		exit(1);

  parent reply	other threads:[~2011-02-10  5:00 UTC|newest]

Thread overview: 135+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-07  3:56 Recent changes Jens Axboe
2007-04-14  4:00 ` Jens Axboe
2007-04-15  4:00 ` Jens Axboe
2007-04-17  4:00 ` Jens Axboe
2007-04-19  4:00 ` Jens Axboe
2007-05-12  4:00 ` Jens Axboe
2007-05-17  4:00 ` Jens Axboe
2007-05-22  4:00 ` Jens Axboe
2007-05-31  4:00 ` Jens Axboe
2007-06-01  4:00 ` Jens Axboe
2007-06-14  4:00 ` Jens Axboe
2007-07-19  4:00 ` Jens Axboe
2007-07-25  4:00 ` Jens Axboe
2007-07-31  4:00 ` Jens Axboe
2007-08-21  4:00 ` Jens Axboe
2007-08-27  4:00 ` Jens Axboe
2007-08-28  4:00 ` Jens Axboe
2007-08-29  4:00 ` Jens Axboe
2007-09-11  4:00 ` Jens Axboe
2007-10-02  4:00 ` Jens Axboe
2007-10-03  4:00 ` Jens Axboe
2007-10-06  4:00 ` Jens Axboe
2007-10-11  4:00 ` Jens Axboe
2007-10-30  5:00 ` Jens Axboe
2007-11-09  5:00 ` Jens Axboe
2007-11-14  5:00 ` Jens Axboe
2007-11-15  5:00 ` Jens Axboe
2007-12-07  5:00 ` Jens Axboe
2007-12-08  5:00 ` Jens Axboe
2007-12-10  5:00 ` Jens Axboe
2007-12-11  5:00 ` Jens Axboe
2008-01-04  5:00 ` Jens Axboe
2008-02-01  5:00 ` Jens Axboe
2008-02-06  5:00 ` Jens Axboe
2008-02-09  5:00 ` Jens Axboe
2008-02-13  5:00 ` Jens Axboe
2008-02-14  5:00 ` Jens Axboe
2008-02-23  5:00 ` Jens Axboe
2008-04-03  4:00 ` Jens Axboe
2008-04-03  7:04 ` Jens Axboe
2008-05-06  4:00 ` Jens Axboe
2008-05-09  4:00 ` Jens Axboe
2008-05-10  4:00 ` Jens Axboe
2008-05-13  4:00 ` Jens Axboe
2008-05-19  4:00 ` Jens Axboe
2008-05-22  4:00 ` Jens Axboe
2008-05-28  4:00 ` Jens Axboe
2008-07-02  4:00 ` Jens Axboe
2008-08-16  4:00 ` Jens Axboe
2008-09-27  4:00 ` Jens Axboe
2008-10-11  4:00 ` Jens Axboe
2008-10-17  4:00 ` Jens Axboe
2008-10-18  4:00 ` Jens Axboe
2008-10-21  4:00 ` Jens Axboe
2008-10-29  5:00 ` Jens Axboe
2008-10-31  5:00 ` Jens Axboe
2008-11-11  5:00 ` Jens Axboe
2008-11-12  5:00 ` Jens Axboe
2008-11-13  5:00 ` Jens Axboe
2009-01-13  5:00 ` Jens Axboe
2009-01-22  5:00 ` Jens Axboe
2009-01-24  5:00 ` Jens Axboe
2009-02-10  5:00 ` Jens Axboe
2009-02-12  5:00 ` Jens Axboe
2009-02-13  5:00 ` Jens Axboe
2009-02-14  5:00 ` Jens Axboe
2009-02-18  5:00 ` Jens Axboe
2009-02-19  5:00 ` Jens Axboe
2009-03-13  5:00 ` Jens Axboe
2009-03-24  5:00 ` Jens Axboe
2009-03-26  5:00 ` Jens Axboe
2009-03-27  5:00 ` Jens Axboe
2009-04-07  4:00 ` Jens Axboe
2009-04-18  4:00 ` Jens Axboe
2009-04-22  4:00 ` Jens Axboe
2009-05-13  4:00 ` Jens Axboe
2009-08-15  4:00 ` Jens Axboe
2009-09-02  4:00 ` Jens Axboe
2009-10-09  4:00 ` Jens Axboe
2009-10-10  4:00 ` Jens Axboe
2010-02-23  5:00 ` Jens Axboe
2010-03-23  5:00 ` Jens Axboe
2010-04-20  4:00 ` Jens Axboe
2010-04-21  4:00 ` Jens Axboe
2010-09-17  4:00 ` Jens Axboe
2010-10-12 15:38 ` Edward Shishkin
2010-10-12 16:52 ` Jens Axboe
2010-10-23  4:00 ` Jens Axboe
2010-12-02  5:00 ` Jens Axboe
2010-12-20  4:36 ` Duy Le (Dan)
2011-01-12  5:00 ` Jens Axboe
2011-01-15  5:00 ` Jens Axboe
2011-02-10  5:00 ` Jens Axboe [this message]
2011-03-17  5:00 ` Jens Axboe
2011-05-27  4:00 ` Jens Axboe
2011-08-04  4:00 ` Jens Axboe
2011-08-04 11:50 ` Edward Shishkin
2011-08-04 12:08 ` Jens Axboe
2011-08-12  4:00 ` Jens Axboe
2012-02-01  5:00 ` Jens Axboe
2012-02-02  5:00 ` Jens Axboe
2012-02-28  5:00 ` Jens Axboe
     [not found] <20090409040002.0D18237A271@kernel.dk>
2009-04-17 21:38 ` Girish Satihal
2009-04-18 17:48   ` Jens Axboe
2009-04-20 14:42     ` Girish Satihal
2009-04-20 18:05       ` Jens Axboe
2009-04-20 20:54         ` Girish Satihal
2009-04-21  5:28           ` Jens Axboe
2009-04-21  7:47             ` Jens Axboe
2009-04-21 15:46               ` Girish Satihal
2009-04-21 19:15                 ` Jens Axboe
2009-04-21 22:17                   ` Girish Satihal
2009-04-22  5:46                     ` Jens Axboe
2009-04-22  5:53                       ` Gurudas Pai
2009-04-22 16:46                       ` Girish Satihal
2009-04-22 17:40                         ` Jens Axboe
     [not found] <869776.96350.qm@web63807.mail.re1.yahoo.com>
2009-04-24  4:40 ` Gurudas Pai
2010-11-06  5:00 Jens Axboe
     [not found] <20110114050004.0ECBF37A2F4@kernel.dk>
2011-01-14 11:38 ` Bruce Cran
2011-01-14 11:41   ` Jens Axboe
     [not found] <20110127050004.1AE9737A304@kernel.dk>
2011-01-27  8:51 ` Bruce Cran
2011-01-27  9:08   ` Jens Axboe
     [not found] <20110125050003.F378B37A302@kernel.dk>
2011-01-27 21:08 ` Steven Pratt
2011-01-27 21:12   ` Jens Axboe
2011-01-27 22:06   ` Bruce Cran
2011-01-28  8:28     ` Jens Axboe
2011-06-28  9:36 Konstantin Belousov
2011-06-28 10:37 ` Chris Wilson
2011-10-14  4:00 Jens Axboe
     [not found] <20120406040004.1BF99484001@kernel.dk>
2012-04-06  4:29 ` Danny Kukawka
2012-04-06 13:31   ` Jens Axboe
2012-04-06 17:40     ` Danny Kukawka
2012-04-06 17:44       ` Jens Axboe
2012-04-14  6:45         ` Danny Kukawka
2012-04-14 14:47           ` Jens Axboe

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=20110210050004.5732D37A2C9@kernel.dk \
    --to=jaxboe@fusionio.com \
    --cc=linux-btrace@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 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.