[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c11e62ae-3439-e3e3-adba-d7f5f951791c@grimberg.me>
Date: Wed, 17 Aug 2022 12:44:09 +0300
From: Sagi Grimberg <sagi@...mberg.me>
To: Keith Busch <kbusch@...nel.org>,
"Fabio M. De Francesco" <fmdefrancesco@...il.com>
Cc: Christoph Hellwig <hch@....de>,
Chaitanya Kulkarni <kch@...dia.com>,
linux-nvme@...ts.infradead.org, linux-kernel@...r.kernel.org,
Ira Weiny <ira.weiny@...el.com>
Subject: Re: [RFC PATCH] nvmet-tcp: Don't kmap() pages which can't come from
HIGHMEM
>> Therefore, I have two questions: am I right about thinking that the pages
>> mapped in nvmet_tcp_map_pdu_iovec() are allocated with GFP_KERNEL?
>
> I think you are correct.
It is correct. It is the same model for the linux scsi target, sunrpc
etc.
>> If so, can anyone with more knowledge than mine please say if my changes make
>> any sense?
>
> I think it does make sense. I like the code simplification, though this use
> was't really paying the kmap penalty since, as you mentioned, this is never
> highmem.
Yes, its the same code-path. Would be great if we still had an
abstraction that would do the right thing regardless of highmem or
not like kmap provides though.
> You should also remove the cmd's 'nr_mapped' field while you're at it,
> otherwise you'll hit the WARN in nvmet_tcp_free_cmd_buffers().
Not remove nr_mapped because we use it to know the iovec entries, but
we can just remove the WARN statement.
Powered by blists - more mailing lists