All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Damien Le Moal <damien.lemoal@wdc.com>
Cc: linux-scsi@vger.kernel.org,
	"Martin K . Petersen" <martin.petersen@oracle.com>,
	linux-block@vger.kernel.org, Jens Axboe <axboe@kernel.dk>,
	Christoph Hellwig <hch@lst.de>,
	Bart Van Assche <bvanassche@acm.org>
Subject: Re: [PATCH 1/3] block: Allow mapping of vmalloc-ed buffers
Date: Tue, 25 Jun 2019 18:22:35 +0200	[thread overview]
Message-ID: <20190625162235.GA9203@lst.de> (raw)
In-Reply-To: <20190625024625.23976-2-damien.lemoal@wdc.com>

On Tue, Jun 25, 2019 at 11:46:23AM +0900, Damien Le Moal wrote:
> To allow the SCSI subsystem scsi_execute_req() function to issue
> requests using large buffers that are better allocated with vmalloc()
> rather than kmalloc(), modify bio_map_kern() to allow passing a buffer
> allocated with the vmalloc() function. To do so, simply test the buffer
> address using is_vmalloc_addr() and use vmalloc_to_page() instead of
> virt_to_page() to obtain the pages of vmalloc-ed buffers.

This is broken on architectures with VIVT caches.  You need to flush
and invalidate the caches based on the virtual address on those before
performing DMA operations.

  parent reply	other threads:[~2019-06-25 16:23 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-25  2:46 [PATCH 0/3] Fix zone revalidation memory allocation failures Damien Le Moal
2019-06-25  2:46 ` [PATCH 1/3] block: Allow mapping of vmalloc-ed buffers Damien Le Moal
2019-06-25  3:24   ` Chaitanya Kulkarni
2019-06-25 15:59     ` Bart Van Assche
2019-06-25 16:06       ` Chaitanya Kulkarni
2019-06-26  1:38         ` Damien Le Moal
2019-06-26  4:19           ` Chaitanya Kulkarni
2019-06-25 15:59   ` Bart Van Assche
2019-06-25 16:22   ` Christoph Hellwig [this message]
2019-06-25  2:46 ` [PATCH 2/3] sd_zbc: Fix report zones buffer allocation Damien Le Moal
2019-06-25 10:37   ` kbuild test robot
2019-06-25 16:07   ` Bart Van Assche
2019-06-25  2:46 ` [PATCH 3/3] block: Limit zone array allocation size Damien Le Moal
2019-06-25 16:10   ` Bart Van Assche

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=20190625162235.GA9203@lst.de \
    --to=hch@lst.de \
    --cc=axboe@kernel.dk \
    --cc=bvanassche@acm.org \
    --cc=damien.lemoal@wdc.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.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 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.