On giovedì 30 giugno 2022 23:59:23 CEST Alexander Duyck wrote:
On Thu, Jun 30, 2022 at 11:18 AM Fabio M. De Francescowrote:
<fmdefrancesco@xxxxxxxxx> wrote:
On giovedì 30 giugno 2022 18:09:18 CEST Alexander Duyck wrote:
On Thu, Jun 30, 2022 at 8:25 AM Eric Dumazet <edumazet@xxxxxxxxxx>
andwrote:
On Thu, Jun 30, 2022 at 5:17 PM Alexander Duyck
<alexander.duyck@xxxxxxxxx> wrote:
On Thu, Jun 30, 2022 at 3:10 AM Maciej Fijalkowski
<maciej.fijalkowski@xxxxxxxxx> wrote:
On Wed, Jun 29, 2022 at 10:58:36AM +0200, Fabio M. De Francesco
kmap_local_page().The use of kmap() is being deprecated in favor of
With kmap_local_page(), the mapping is per thread, CPU local
fromnot
globally visible. Furthermore, the mapping can be acquired
ixgbe_check_lbtest_frame()any context
(including interrupts).
Therefore, use kmap_local_page() in
visible.because
this mapping is per thread, CPU local, and not globally
plain
Hi,
I'd like to ask why kmap was there in the first place and not
highmem-internal.h#L40accesspage_address() ?
Alex?
The page_address function only works on architectures that have
mappedto all of physical memory via virtual memory addresses. The kmap
function is meant to take care of highmem which will need to be
before it can be accessed.
For non-highmem pages kmap just calls the page_address function.
https://elixir.bootlin.com/linux/latest/source/include/linux/
allocating
Sure, but drivers/net/ethernet/intel/ixgbe/ixgbe_main.c is
ispages that are not highmem ?
This kmap() does not seem needed.
Good point. So odds are page_address is fine to use. Actually there
pagea note to that effect in ixgbe_pull_tail.I don't know this code, however I know kmap*().
As such we could probably go through and update igb, and several of
the other Intel drivers as well.
- Alex
I assumed that, if author used kmap(), there was possibility that the
Therefore,came from highmem.
In that case kmap_local_page() looks correct here.
However, now I read that that page _cannot_ come from highmem.
page_address() would suffice.
If you all want I can replace kmap() / kunmap() with a "plain"
page_address(). Please let me know.
Thanks,
Fabio
Replacing it with just page_address() should be fine. Back when I
wrote the code I didn't realize that GFP_ATOMIC pages weren't
allocated from highmem so I suspect I just used kmap since it was the
way to cover all the bases.
Thanks,
- Alex
OK, I'm about to prepare another patch with page_address() (obviously, this
should be discarded).
Last thing... Is that page allocated with dma_pool_alloc() at
ixgbe/ixgbe_fcoe.c:196? Somewhere else?
Thanks,
Fabio
P.S.: Can you say something about how pages are allocated in intel/e1000
and in intel/e1000e? I see that those drivers use kmap_atomic().