From: Matthew Wilcox <willy@infradead.org>
To: Ira Weiny <ira.weiny@intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, Atul Gupta <atul.gupta@chelsio.com>,
linux-crypto@vger.kernel.org
Subject: Re: [PATCH v2 1/3] mm: Introduce page_size()
Date: Tue, 23 Jul 2019 11:14:13 -0700 [thread overview]
Message-ID: <20190723181413.GN363@bombadil.infradead.org> (raw)
In-Reply-To: <20190723175838.GA29729@iweiny-DESK2.sc.intel.com>
On Tue, Jul 23, 2019 at 10:58:38AM -0700, Ira Weiny wrote:
> > @@ -1092,7 +1092,7 @@ int chtls_sendmsg(struct sock *sk, struct msghdr *msg, size_t size)
> > if (page && off == pg_size) {
> > put_page(page);
> > TCP_PAGE(sk) = page = NULL;
> > - pg_size = PAGE_SIZE;
> > + pg_size = 0;
>
> Yea... I was not sure about this one at first... :-/
I'm not sure we actually need to change pg_size here, but it seemed
appropriate to set it back to 0.
> > __GFP_NORETRY,
> > order);
> > - if (page)
> > - pg_size <<= order;
> > }
> > if (!page) {
> > page = alloc_page(gfp);
> > - pg_size = PAGE_SIZE;
> > }
> > if (!page)
> > goto wait_for_memory;
>
> Side note: why 2 checks for !page?
Because page is assigned to after the first check ...
next prev parent reply other threads:[~2019-07-23 18:14 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-21 10:46 [PATCH v2 0/3] Make working with compound pages easier Matthew Wilcox
2019-07-21 10:46 ` [PATCH v2 1/3] mm: Introduce page_size() Matthew Wilcox
2019-07-23 0:43 ` Ira Weiny
2019-07-23 16:02 ` Matthew Wilcox
2019-07-23 17:58 ` Ira Weiny
2019-07-23 18:14 ` Matthew Wilcox [this message]
2019-07-23 20:44 ` Ira Weiny
2019-07-23 21:03 ` Matthew Wilcox
2019-09-20 23:28 ` Andrew Morton
2019-09-21 1:09 ` Matthew Wilcox
2019-09-22 2:13 ` Weiny, Ira
2019-07-21 10:46 ` [PATCH v2 2/3] mm: Introduce page_shift() Matthew Wilcox
2019-07-23 0:44 ` Ira Weiny
2019-07-24 10:40 ` kbuild test robot
2019-07-25 0:30 ` Andrew Morton
2019-07-25 20:30 ` Ira Weiny
2019-09-23 20:30 ` Matthew Wilcox
2019-07-21 10:46 ` [PATCH v2 3/3] mm: Introduce compound_nr() Matthew Wilcox
2019-07-23 0:46 ` Ira Weiny
2019-07-23 12:55 ` [PATCH v2 0/3] Make working with compound pages easier Kirill A. Shutemov
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=20190723181413.GN363@bombadil.infradead.org \
--to=willy@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=atul.gupta@chelsio.com \
--cc=ira.weiny@intel.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-mm@kvack.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).