From: Mike Christie <michaelc@cs.wisc.edu>
To: open-iscsi@googlegroups.com
Cc: Christoph Hellwig <hch@infradead.org>,
FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>,
linux-fsdevel@vger.kernel.org, ext2-devel@lists.sourceforge.net,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: allowed pages in the block later, was Re: [Ext2-devel] [PATCH] ext3: avoid sending down non-refcounted pages
Date: Thu, 08 Dec 2005 12:22:37 -0600 [thread overview]
Message-ID: <439879ED.5050706@cs.wisc.edu> (raw)
In-Reply-To: <439878E4.6060505@cs.wisc.edu>
Mike Christie wrote:
>
> Christoph Hellwig wrote:
>
>> On Thu, Dec 08, 2005 at 03:18:33AM -0700, Andreas Dilger wrote:
>>
>>> What happens on 1kB or 2kB block filesystems (i.e. b_size != PAGE_SIZE)?
>>> This will allocate a whole page for each block (which may be
>>> considerable
>>> overhead on e.g. a 64kB PAGE_SIZE ia64 or PPC system).
>>
>>
>>
>> Yes. How often do we trigger this codepath?
>>
>> The problem we're trying to solve here is how do implement network block
>> devices (nbd, iscsi) efficiently. The zero copy codepath in the
>> networking
>> layer does need to grab additional references to pages. So to use
>> sendpage
>> we need a refcountable page. pages used by the slab allocator are not
>> normally refcounted so try to do get_page/pub_page on them will break.
>>
>> One way to work around that would be to detect kmalloced pages and use
>> a slowpath for that. The major issues with that is that we don't have a
>> reliable way to detect if a given struct page comes from the slab
>> allocator
>> or not. The minor problem is that even with such an indicator it means
>> having a separate and lightly tested slowpath for this rare case.
>>
>> All in all I think we should document that the block layer only accepts
>> properly refcounted pages, which is everything but kmalloced pages (even
>> vmalloc is totally fine)
>
>
> Is it anytime kmalloc is used? For scsi when it uses scsi_execute* for
> something like scanning (report luns result is kmallocd) would this be a
> problem?
>
> If PageSlab() does work, then could we have a request queue flag that
> bounces those pages for all block layer drivers. Pretty slow and yucky
> but if we have to convert SCSI and maybe other parts of the block layer
> maybe it will be easiest for now.
>
Or there is not a way to do kmalloc(GFP_BLK) that gives us the right
type of memory is there?
next prev parent reply other threads:[~2005-12-08 18:22 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-08 9:09 [PATCH] ext3: avoid sending down non-refcounted pages FUJITA Tomonori
2005-12-08 10:18 ` Andreas Dilger
2005-12-08 12:39 ` [Ext2-devel] " FUJITA Tomonori
2005-12-08 13:42 ` allowed pages in the block later, was " Christoph Hellwig
2005-12-08 13:58 ` Pekka Enberg
2005-12-12 17:27 ` allowed pages in the block later, was " Christoph Hellwig
2005-12-08 18:18 ` allowed pages in the block later, was Re: [Ext2-devel] " Mike Christie
2005-12-08 18:22 ` Mike Christie [this message]
2005-12-08 19:20 ` Pekka Enberg
2005-12-11 0:47 ` Andrew Morton
2005-12-11 8:44 ` allowed pages in the block later, was " Arjan van de Ven
2005-12-12 17:25 ` allowed pages in the block later, was Re: [Ext2-devel] " Christoph Hellwig
2005-12-12 20:12 ` Andrew Morton
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=439879ED.5050706@cs.wisc.edu \
--to=michaelc@cs.wisc.edu \
--cc=ext2-devel@lists.sourceforge.net \
--cc=fujita.tomonori@lab.ntt.co.jp \
--cc=hch@infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=open-iscsi@googlegroups.com \
/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;
as well as URLs for NNTP newsgroup(s).