From: Alexander Duyck <alexander.duyck@gmail.com>
To: David Miller <davem@davemloft.net>, alexander.h.duyck@redhat.com
Cc: netdev@vger.kernel.org, linux-mm@kvack.org,
akpm@linux-foundation.org, eric.dumazet@gmail.com
Subject: Re: [PATCH 01/10] net: Use cached copy of pfmemalloc to avoid accessing page
Date: Sun, 10 May 2015 17:01:15 -0700 [thread overview]
Message-ID: <554FF14B.4050901@gmail.com> (raw)
In-Reply-To: <20150510.191851.414324528131774160.davem@davemloft.net>
On 05/10/2015 04:18 PM, David Miller wrote:
> From: Alexander Duyck <alexander.h.duyck@redhat.com>
> Date: Wed, 06 May 2015 21:11:40 -0700
>
>> + /* use OR instead of assignment to avoid clearing of bits in mask */
>> + if (pfmemalloc)
>> + skb->pfmemalloc = 1;
>> + skb->head_frag = 1;
> ...
>> + /* use OR instead of assignment to avoid clearing of bits in mask */
>> + if (nc->pfmemalloc)
>> + skb->pfmemalloc = 1;
>> + skb->head_frag = 1;
> Maybe make these two cases more consistent by either accessing
> nc->pfmemalloc or using a local variable in both cases.
The only option would be to use a local variable in both cases, but then
I am still stuck with the differences in when I can access the caches.
The reason for the difference between the two is that in the case of
netdev_alloc_skb/frag the netdev_alloc_cache can only be accessed with
IRQs disabled, whereas in the napi_alloc_skb case we can access the
napi_alloc_cache at any point in the function. Either way I am going to
be stuck with differences because of the local_irq_save/restore that
must be called when accessing the page frag cache that doesn't exist in
the napi case.
- Alex
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2015-05-11 0:01 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-07 4:11 [PATCH 00/10] Refactor netdev page frags and move them into mm/ Alexander Duyck
2015-05-07 4:11 ` Alexander Duyck
2015-05-07 4:11 ` [PATCH 01/10] net: Use cached copy of pfmemalloc to avoid accessing page Alexander Duyck
2015-05-07 4:11 ` Alexander Duyck
2015-05-10 23:18 ` David Miller
2015-05-11 0:01 ` Alexander Duyck [this message]
2015-05-11 0:52 ` David Miller
2015-05-11 0:52 ` David Miller
2015-05-07 4:11 ` [PATCH 02/10] igb: Don't use NETDEV_FRAG_PAGE_MAX_SIZE in descriptor calculation Alexander Duyck
2015-05-07 4:11 ` Alexander Duyck
2015-05-07 4:11 ` [PATCH 03/10] net: Store virtual address instead of page in netdev_alloc_cache Alexander Duyck
2015-05-07 4:11 ` Alexander Duyck
2015-05-07 4:11 ` [PATCH 04/10] mm/net: Rename and move page fragment handling from net/ to mm/ Alexander Duyck
2015-05-07 4:11 ` Alexander Duyck
2015-05-07 4:12 ` [PATCH 05/10] net: Add skb_free_frag to replace use of put_page in freeing skb->head Alexander Duyck
2015-05-07 4:12 ` [PATCH 06/10] netcp: Replace put_page(virt_to_head_page(ptr)) w/ skb_free_frag Alexander Duyck
2015-05-07 4:12 ` Alexander Duyck
2015-05-07 4:12 ` [PATCH 07/10] mvneta: " Alexander Duyck
2015-05-07 4:12 ` Alexander Duyck
2015-05-07 4:12 ` [PATCH 08/10] e1000: Replace e1000_free_frag with skb_free_frag Alexander Duyck
2015-05-07 4:12 ` Alexander Duyck
2015-05-07 8:46 ` Jeff Kirsher
2015-05-07 8:46 ` Jeff Kirsher
2015-05-07 4:12 ` [PATCH 09/10] hisilicon: Replace put_page(virt_to_head_page()) with skb_free_frag() Alexander Duyck
2015-05-07 4:12 ` Alexander Duyck
2015-05-07 4:12 ` [PATCH 10/10] bnx2x, tg3: " Alexander Duyck
2015-05-07 4:12 ` Alexander Duyck
2015-05-10 23:17 ` [PATCH 00/10] Refactor netdev page frags and move them into mm/ David Miller
2015-05-11 20:36 ` Andrew Morton
2015-05-12 14:39 ` David Miller
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=554FF14B.4050901@gmail.com \
--to=alexander.duyck@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=alexander.h.duyck@redhat.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=linux-mm@kvack.org \
--cc=netdev@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 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.