From: Vladimir Davydov <vdavydov.dev@gmail.com>
To: tarantool-patches@freelists.org
Subject: [PATCH 2/5] vinyl: pass page info by reference to reader thread
Date: Wed, 29 May 2019 18:12:48 +0300 [thread overview]
Message-ID: <db18f8b99b343d8e83ba3575f530f3199c6bc65b.1559142561.git.vdavydov.dev@gmail.com> (raw)
In-Reply-To: <cover.1559142561.git.vdavydov.dev@gmail.com>
In-Reply-To: <cover.1559142561.git.vdavydov.dev@gmail.com>
Since a page read task references the source run file, we don't need to
pass page info by value.
---
src/box/vy_run.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/box/vy_run.c b/src/box/vy_run.c
index 84e0f50b..5b990992 100644
--- a/src/box/vy_run.c
+++ b/src/box/vy_run.c
@@ -92,7 +92,7 @@ struct vy_page_read_task {
/** parent */
struct cbus_call_msg base;
/** vinyl page metadata */
- struct vy_page_info page_info;
+ struct vy_page_info *page_info;
/** vy_run with fd - ref. counted */
struct vy_run *run;
/** [out] resulting vinyl page */
@@ -944,7 +944,7 @@ vy_page_read_cb(struct cbus_call_msg *base)
ZSTD_DStream *zdctx = vy_env_get_zdctx(task->run->env);
if (zdctx == NULL)
return -1;
- return vy_page_read(task->page, &task->page_info, task->run, zdctx);
+ return vy_page_read(task->page, task->page_info, task->run, zdctx);
}
/**
@@ -1014,7 +1014,7 @@ vy_run_iterator_load_page(struct vy_run_iterator *itr, uint32_t page_no,
env->next_reader %= env->reader_pool_size;
task->run = slice->run;
- task->page_info = *page_info;
+ task->page_info = page_info;
task->page = page;
vy_run_ref(task->run);
--
2.11.0
next prev parent reply other threads:[~2019-05-29 15:12 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-29 15:12 [PATCH 0/5] Hand over key lookup in a page to vinyl " Vladimir Davydov
2019-05-29 15:12 ` [PATCH 1/5] vinyl: factor out function to lookup key in page Vladimir Davydov
2019-05-29 18:16 ` [tarantool-patches] " Konstantin Osipov
2019-05-29 15:12 ` Vladimir Davydov [this message]
2019-05-29 18:16 ` [tarantool-patches] Re: [PATCH 2/5] vinyl: pass page info by reference to reader thread Konstantin Osipov
2019-05-29 15:12 ` [PATCH 3/5] vinyl: encapsulate reader thread selection logic in a helper function Vladimir Davydov
2019-05-29 18:24 ` [tarantool-patches] " Konstantin Osipov
2019-05-29 15:12 ` [PATCH 4/5] vinyl: do not allow to cancel a fiber reading a page Vladimir Davydov
2019-05-29 18:35 ` [tarantool-patches] " Konstantin Osipov
2019-05-29 15:12 ` [PATCH 5/5] vinyl: lookup key in reader thread Vladimir Davydov
2019-05-29 18:41 ` [tarantool-patches] " Konstantin Osipov
2019-05-30 8:42 ` [PATCH 0/5] Hand over key lookup in a page to vinyl " Vladimir Davydov
2019-05-30 14:20 ` Vladimir Davydov
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=db18f8b99b343d8e83ba3575f530f3199c6bc65b.1559142561.git.vdavydov.dev@gmail.com \
--to=vdavydov.dev@gmail.com \
--cc=tarantool-patches@freelists.org \
--subject='Re: [PATCH 2/5] vinyl: pass page info by reference to reader thread' \
/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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox