From: Denis Lunev <den@virtuozzo.com>
To: David Miller <davem@davemloft.net>,
Jan Dakinevich <jan.dakinevich@virtuozzo.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Konstantin Khorenko <khorenko@virtuozzo.com>,
"pabeni@redhat.com" <pabeni@redhat.com>,
"viro@zeniv.linux.org.uk" <viro@zeniv.linux.org.uk>,
"axboe@kernel.dk" <axboe@kernel.dk>,
"hare@suse.com" <hare@suse.com>,
"kgraul@linux.ibm.com" <kgraul@linux.ibm.com>,
"kyeongdon.kim@lge.com" <kyeongdon.kim@lge.com>,
"tglx@linutronix.de" <tglx@linutronix.de>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH] af_unix: utilize skb's fragment list for sending large datagrams
Date: Sat, 24 Aug 2019 20:38:48 +0000 [thread overview]
Message-ID: <bdf81fa5-c578-a4c0-a7b3-87cbd3ea10cc@virtuozzo.com> (raw)
In-Reply-To: <20190822.120421.71092037400077946.davem@davemloft.net>
On 8/22/19 9:04 PM, David Miller wrote:
> From: Jan Dakinevich <jan.dakinevich@virtuozzo.com>
> Date: Thu, 22 Aug 2019 10:38:39 +0000
>
>> However, paged part can not exceed MAX_SKB_FRAGS * PAGE_SIZE, and large
>> datagram causes increasing skb's data buffer. Thus, if any user-space
>> program sets send buffer (by calling setsockopt(SO_SNDBUF, ...)) to
>> maximum allowed size (wmem_max) it becomes able to cause any amount
>> of uncontrolled high-order kernel allocations.
> So? You want huge SKBs you get the high order allocations, seems
> rather reasonable to me.
>
> SKBs using fragment lists are the most difficult and cpu intensive
> geometry for an SKB to have and we should avoid using it where
> feasible.
>
> I don't want to apply this, sorry.
Under even mediocre memory pressure this will either takes seconds or fail,
which does not look good. We can try to allocate memory of big order
but not that hard and switch to fragments when possible.
Please also note that even ordinary user could trigger really big
allocations
and thus force the whole node to dance.
Den
Den
prev parent reply other threads:[~2019-08-24 20:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-22 10:38 [PATCH] af_unix: utilize skb's fragment list for sending large datagrams Jan Dakinevich
2019-08-22 19:04 ` David Miller
2019-08-24 20:38 ` Denis Lunev [this message]
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=bdf81fa5-c578-a4c0-a7b3-87cbd3ea10cc@virtuozzo.com \
--to=den@virtuozzo.com \
--cc=axboe@kernel.dk \
--cc=davem@davemloft.net \
--cc=hare@suse.com \
--cc=jan.dakinevich@virtuozzo.com \
--cc=kgraul@linux.ibm.com \
--cc=khorenko@virtuozzo.com \
--cc=kyeongdon.kim@lge.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=tglx@linutronix.de \
--cc=viro@zeniv.linux.org.uk \
/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