[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200819.120709.1311664171016372891.davem@davemloft.net>
Date: Wed, 19 Aug 2020 12:07:09 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: hch@....de
Cc: kuba@...nel.org, colyli@...e.de, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net: bypass ->sendpage for slab pages
From: Christoph Hellwig <hch@....de>
Date: Wed, 19 Aug 2020 07:19:45 +0200
> Sending Slab or tail pages into ->sendpage will cause really strange
> delayed oops. Prevent it right in the networking code instead of
> requiring drivers to guess the exact conditions where sendpage works.
>
> Based on a patch from Coly Li <colyli@...e.de>.
>
> Signed-off-by: Christoph Hellwig <hch@....de>
Yes this fixes the problem, but it doesn't in any way deal with the
callers who are doing this stuff.
They are all likely using sendpage because they expect that it will
avoid the copy, for performance reasons or whatever.
Now it won't.
At least with Coly's patch set, the set of violators was documented
and they could switch to allocating non-slab pages or calling
sendmsg() or write() instead.
I hear talk about ABIs just doing the right thing, but when their
value is increased performance vs. other interfaces it means that
taking a slow path silently is bad in the long term. And that's
what this proposed patch here does.
Powered by blists - more mailing lists