From: Olivier Galibert <galibert@pobox.com>
To: "Hack inc." <linux-kernel@vger.kernel.org>
Subject: tcp_sendpage and page allocation lifetime vs. iscsi
Date: Mon, 25 Apr 2005 19:02:59 +0200 [thread overview]
Message-ID: <20050425170259.GA36024@dspnet.fr.eu.org> (raw)
I have a problem with the iscsi driver (both 4.x and 5.x) and scsi
tape I'm not sure how to solve. It may linked to some specific
characteristics of the tg3 network driver.
What happens is, from what I can trace:
1- st alloc_pages a bunch of pages for buffering
2- st sends a bunch of them to iscsi for writing (32K is common when
labelling a tape for instance)
3- iscsi sends whatever header is needed followed by the data using
tcp_sendpage
4- tcp_sendpage copies from of the pages but get_page() others,
probably depending on the state of the socket buffer. It returns
immediatly anyway, leaving some pages with an elevated count (which, I
guess, it will eventually decrement again)
5- iscsi returns to st
6- st reuses the buffer immediatly, and/or frees it if the device is
closed. Silent corruption in one case, bad_page in __free_page_ok
called from normalize_buffer in the other.
I'm going to complete my traces to be sure that's really what's going
on (I don't have a log immediatly after sendpage yet). But in any
case, what would the solution be?
OG.
next reply other threads:[~2005-04-25 17:20 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-25 17:02 Olivier Galibert [this message]
2005-04-25 19:11 ` tcp_sendpage and page allocation lifetime vs. iscsi Avi Kivity
2005-04-25 19:19 ` David S. Miller
2005-04-25 19:43 ` Avi Kivity
2005-04-25 19:37 ` David S. Miller
2005-04-25 22:06 ` Olivier Galibert
2005-04-25 22:08 ` David S. Miller
2005-04-25 22:31 ` Olivier Galibert
2005-04-29 17:09 ` Dmitry Yusupov
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=20050425170259.GA36024@dspnet.fr.eu.org \
--to=galibert@pobox.com \
--cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox