tty: tty_io: Switch to vmalloc() fallback in case of TTY_NO_WRITE_SPLIT
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 20 Dec 2021 13:32:50 +0000 (15:32 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 21 Dec 2021 08:18:44 +0000 (09:18 +0100)
commitd6d9d17abac8d337ecb052b47e918ca9c0b4ba1b
treebeed330b05aae4a2e16316b2f4f97b7f3f91b1f2
parente822b4973f49015e1c6f63b91c8641ed9bfaf229
tty: tty_io: Switch to vmalloc() fallback in case of TTY_NO_WRITE_SPLIT

When TTY_NO_WRITE_SPLIT is set and 64 KiB chunks are used, allow
vmalloc() fallback. Supply __GFP_RETRY_MAYFAIL to make kmalloc()
preferable over vmalloc() since we may want a better performance.

Note, both current users copy data to another buffer anyway, so
the type of our allocation doesn't affect their expectations.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20211220133250.3070-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/tty_io.c
drivers/usb/class/cdc-acm.c