From: Stanislaw Gruszka <sgruszka@redhat.com>
To: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Cc: Felix Fietkau <nbd@nbd.name>, linux-wireless@vger.kernel.org
Subject: Re: [RFC 2/2] mt76: make frag_cache global per cpu structure
Date: Wed, 3 Oct 2018 12:22:11 +0200 [thread overview]
Message-ID: <20181003102210.GD2229@redhat.com> (raw)
In-Reply-To: <20181003093853.GC27279@localhost.localdomain>
On Wed, Oct 03, 2018 at 11:38:54AM +0200, Lorenzo Bianconi wrote:
> > +static DEFINE_PER_CPU(struct page_frag_cache, mt76_frag_cache);
> > +
> > +void *mt76_alloc_frag(unsigned int fragsz)
> > +{
> > + struct page_frag_cache *fc;
> > + unsigned long flags;
> > + void *data;
> > +
> > + local_irq_save(flags);
>
> I like this approach since we will avoid a cache miss for the spinlock :)
> Do we still need to disable local_irq here since (not considering fw upload)
> I guess there is no contention for mt76_frag_cache
I think is needed if we have more than one device, but I think we can
change to local_irq_disable() / local_irq_enable() .
Thanks
Stanislaw
next prev parent reply other threads:[~2018-10-03 10:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-03 9:17 [RFC 1/2] mt76: remove rx_page_lock Stanislaw Gruszka
2018-10-03 9:17 ` [RFC 2/2] mt76: make frag_cache global per cpu structure Stanislaw Gruszka
2018-10-03 9:38 ` Lorenzo Bianconi
2018-10-03 10:22 ` Stanislaw Gruszka [this message]
2018-10-03 10:50 ` Felix Fietkau
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=20181003102210.GD2229@redhat.com \
--to=sgruszka@redhat.com \
--cc=linux-wireless@vger.kernel.org \
--cc=lorenzo.bianconi@redhat.com \
--cc=nbd@nbd.name \
/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.