[ Upstream commit 00516d13d4 ]
We have been using the fact that the QMI and DIAG functions
usually are the only ones with class/subclass/protocol being
ff/ff/ff on Quectel modems. This has allowed us to match the
QMI function without knowing the exact interface number,
which can vary depending on firmware configuration.
The ability to silently reject the DIAG function, which is
usually handled by the option driver, is important for this
method to work. This is done based on the knowledge that it
has exactly 2 bulk endpoints. QMI function control interfaces
will have either 3 or 1 endpoint. This rule is universal so
the quirk condition can be removed.
The fixed layouts known from the Gobi1k and Gobi2k modems
have been gradually replaced by more dynamic layouts, and
many vendors now use configurable layouts without changing
device IDs. Renaming the class/subclass/protocol matching
macro makes it more obvious that this is now not Quectel
specific anymore.
Cc: Kristian Evensen <kristian.evensen@gmail.com>
Cc: Aleksander Morgado <aleksander@aleksander.es>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit 88bf54603f ]
Commit f25e1392fd removed the support for the pre-production variant
of the Dell DW5821e to avoid probing another USB interface unnecessarily.
However, the pre-production samples are found in the wild, and this lack
of support is causing problems for users of such samples. It is therefore
necessary to support both variants.
Matching on both interfaces 0 and 1 is not expected to cause any problem
with either variant, as only the QMI function will be probed successfully
on either. Interface 1 will be rejected based on the HID class for the
production variant:
T: Bus=01 Lev=03 Prnt=04 Port=00 Cnt=01 Dev#= 16 Spd=480 MxCh= 0
D: Ver= 2.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 2
P: Vendor=413c ProdID=81d7 Rev=03.18
S: Manufacturer=DELL
S: Product=DW5821e Snapdragon X20 LTE
S: SerialNumber=0123456789ABCDEF
C: #Ifs= 6 Cfg#= 1 Atr=a0 MxPwr=500mA
I: If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
I: If#= 1 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=00 Prot=00 Driver=usbhid
I: If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
I: If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
I: If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
I: If#= 5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
And interface 0 will be rejected based on too few endpoints for the
pre-production variant:
T: Bus=01 Lev=02 Prnt=02 Port=03 Cnt=03 Dev#= 7 Spd=480 MxCh= 0
D: Ver= 2.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 2
P: Vendor=413c ProdID=81d7 Rev= 3.18
S: Manufacturer=DELL
S: Product=DW5821e Snapdragon X20 LTE
S: SerialNumber=0123456789ABCDEF
C: #Ifs= 5 Cfg#= 1 Atr=a0 MxPwr=500mA
I: If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=
I: If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
I: If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
I: If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
I: If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
Fixes: f25e1392fd ("qmi_wwan: fix interface number for DW5821e production firmware")
Link: https://whrl.pl/Rf0vNk
Reported-by: Lars Melin <larsm17@gmail.com>
Cc: Aleksander Morgado <aleksander@aleksander.es>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit fcd98d4002 ]
The internal statistic counters for the total number of
requests processed per card and per queue used integers. So they do
wrap after a rather huge amount of crypto requests processed. This
patch introduces uint64 counters which should hold much longer but
still may wrap. The sysfs attributes request_count for card and queue
also used only %ld and now display the counter value with %llu.
This is not a security relevant fix. The int overflow which happened
is not in any way exploitable as a security breach.
Signed-off-by: Harald Freudenberger <freude@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit a04564c99b ]
We only use the parsing CRC for checking if a beacon changed,
and elements with an ID > 63 cannot be represented in the
filter. Thus, like we did before with WMM and Cisco vendor
elements, just statically add these forgotten items to the
CRC:
- WLAN_EID_VHT_OPERATION
- WLAN_EID_OPMODE_NOTIF
I guess that in most cases when VHT/HE operation change, the HT
operation also changed, and so the change was picked up, but we
did notice that pure operating mode notification changes were
ignored.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/20200131111300.891737-22-luca@coelho.fi
[restrict to VHT for the mac80211 branch]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit 6b8526d3ab ]
In error cases a NULL can be passed to memcpy. The length will always
be zero, so it doesn't really matter, but go ahead and check for NULL,
anyway, to be more precise and avoid static analysis errors.
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
commit 8188a18ee2 upstream
We don't handle failures in the rb_allocator workqueue allocation
correctly. To fix that, move the code earlier so the cleanup is
easier and we don't have to undo all the interrupt allocations in
this case.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
[Ajay: Modified to apply on v4.19.y and v4.14.y]
Signed-off-by: Ajay Kaher <akaher@vmware.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
The INNO MIPI D-PHY is built in witch a standard digital interface
to talk to any third part Host controller.That is part of Rockchip SoCs,
like rk3368.
Change-Id: I9806882e0e3fb6b20348015d0f34923d1bc46b89
Signed-off-by: WeiYong Bi <bivvy.bi@rock-chips.com>
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
This reverts commit 4ef2449889.
The description for CRU_EMMC/SDMMC/SDIO_CON[0/1] is jumble on
chapters, make it clear that the correct shift is 1 that from
IC engineer.
Change-Id: I48dce293ec6ef82a5c78db38efc083227776ea99
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Leaf changes summary: 5 artifacts changed
Changed leaf types summary: 4 leaf types changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 1 Added function
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable
1 Added function:
[A] 'function void module_layout(module*, modversion_info*, kernel_param*, kernel_symbol*, tracepoint* const*)'
'struct per_cpu_pages at mmzone.h:278:1' changed:
type size changed from 512 to 640 (in bits)
there are data member changes:
type 'list_head[3]' of 'per_cpu_pages::lists' changed:
type name changed from 'list_head[3]' to 'list_head[4]'
array type size changed from 384 to 512
array type subrange 1 changed length from 3 to 4
and size changed from 384 to 512 (in bits) (by +128 bits)
1389 impacted interfaces
'struct per_cpu_pageset at mmzone.h:287:1' changed:
type size changed from 640 to 768 (in bits)
there are data member changes:
type 'struct per_cpu_pages' of 'per_cpu_pageset::pcp' changed as reported earlier
and size changed from 512 to 640 (in bits) (by +128 bits)
's8 per_cpu_pageset::stat_threshold' offset changed from 512 to 640 (in bits) (by +128 bits)
's8 per_cpu_pageset::vm_stat_diff[14]' offset changed from 520 to 648 (in bits) (by +128 bits)
1389 impacted interfaces
'struct pglist_data at mmzone.h:628:1' changed:
type size changed from 42496 to 44032 (in bits)
there are data member changes:
'zone pglist_data::node_zones[3]' size changed from 36864 to 38400 (in bits) (by +1536 bits)
'zonelist pglist_data::node_zonelists[1]' offset changed from 36864 to 38400 (in bits) (by +1536 bits)
'int pglist_data::nr_zones' offset changed from 37376 to 38912 (in bits) (by +1536 bits)
'unsigned long int pglist_data::node_start_pfn' offset changed from 37440 to 38976 (in bits) (by +1536 bits)
'unsigned long int pglist_data::node_present_pages' offset changed from 37504 to 39040 (in bits) (by +1536 bits)
'unsigned long int pglist_data::node_spanned_pages' offset changed from 37568 to 39104 (in bits) (by +1536 bits)
'int pglist_data::node_id' offset changed from 37632 to 39168 (in bits) (by +1536 bits)
'wait_queue_head_t pglist_data::kswapd_wait' offset changed from 37696 to 39232 (in bits) (by +1536 bits)
'wait_queue_head_t pglist_data::pfmemalloc_wait' offset changed from 37888 to 39424 (in bits) (by +1536 bits)
'task_struct* pglist_data::kswapd' offset changed from 38080 to 39616 (in bits) (by +1536 bits)
'int pglist_data::kswapd_order' offset changed from 38144 to 39680 (in bits) (by +1536 bits)
'zone_type pglist_data::kswapd_classzone_idx' offset changed from 38176 to 39712 (in bits) (by +1536 bits)
'int pglist_data::kswapd_failures' offset changed from 38208 to 39744 (in bits) (by +1536 bits)
'int pglist_data::kcompactd_max_order' offset changed from 38240 to 39776 (in bits) (by +1536 bits)
'zone_type pglist_data::kcompactd_classzone_idx' offset changed from 38272 to 39808 (in bits) (by +1536 bits)
'wait_queue_head_t pglist_data::kcompactd_wait' offset changed from 38336 to 39872 (in bits) (by +1536 bits)
'task_struct* pglist_data::kcompactd' offset changed from 38528 to 40064 (in bits) (by +1536 bits)
'unsigned long int pglist_data::totalreserve_pages' offset changed from 38592 to 40128 (in bits) (by +1536 bits)
'zone_padding pglist_data::_pad1_' offset changed from 38912 to 40448 (in bits) (by +1536 bits)
'spinlock_t pglist_data::lru_lock' offset changed from 38912 to 40448 (in bits) (by +1536 bits)
'lruvec pglist_data::lruvec' offset changed from 38976 to 40512 (in bits) (by +1536 bits)
'unsigned long int pglist_data::flags' offset changed from 40064 to 41600 (in bits) (by +1536 bits)
'zone_padding pglist_data::_pad2_' offset changed from 40448 to 41984 (in bits) (by +1536 bits)
'per_cpu_nodestat* pglist_data::per_cpu_nodestats' offset changed from 40448 to 41984 (in bits) (by +1536 bits)
'atomic_long_t pglist_data::vm_stat[29]' offset changed from 40512 to 42048 (in bits) (by +1536 bits)
1389 impacted interfaces
'struct zone at mmzone.h:363:1' changed:
type size changed from 12288 to 12800 (in bits)
4 data member insertions:
'unsigned long int zone::watermark_boost', at offset 192 (in bits) at mmzone.h:371:1
'bool zone::cma_alloc', at offset 640 (in bits) at mmzone.h:393:1
'unsigned long int zone::compact_init_migrate_pfn', at offset 11520 (in bits) at mmzone.h:497:1
'unsigned long int zone::compact_init_free_pfn', at offset 11584 (in bits) at mmzone.h:498:1
there are data member changes:
'unsigned long int zone::nr_reserved_highatomic' offset changed from 192 to 256 (in bits) (by +64 bits)
'long int zone::lowmem_reserve[3]' offset changed from 256 to 320 (in bits) (by +64 bits)
'pglist_data* zone::zone_pgdat' offset changed from 448 to 512 (in bits) (by +64 bits)
'per_cpu_pageset* zone::pageset' offset changed from 512 to 576 (in bits) (by +64 bits)
'unsigned long int zone::zone_start_pfn' offset changed from 576 to 704 (in bits) (by +128 bits)
'unsigned long int zone::managed_pages' offset changed from 640 to 768 (in bits) (by +128 bits)
'unsigned long int zone::spanned_pages' offset changed from 704 to 832 (in bits) (by +128 bits)
'unsigned long int zone::present_pages' offset changed from 768 to 896 (in bits) (by +128 bits)
'const char* zone::name' offset changed from 832 to 960 (in bits) (by +128 bits)
'unsigned long int zone::nr_isolate_pageblock' offset changed from 896 to 1024 (in bits) (by +128 bits)
'int zone::initialized' offset changed from 960 to 1088 (in bits) (by +128 bits)
'zone_padding zone::_pad1_' offset changed from 1024 to 1536 (in bits) (by +512 bits)
'free_area zone::free_area[11]' offset changed from 1024 to 1536 (in bits) (by +512 bits)
'unsigned long int zone::flags' offset changed from 10176 to 10688 (in bits) (by +512 bits)
'spinlock_t zone::lock' offset changed from 10240 to 10752 (in bits) (by +512 bits)
'zone_padding zone::_pad2_' offset changed from 10752 to 11264 (in bits) (by +512 bits)
'unsigned long int zone::percpu_drift_mark' offset changed from 10752 to 11264 (in bits) (by +512 bits)
'unsigned long int zone::compact_cached_free_pfn' offset changed from 10816 to 11328 (in bits) (by +512 bits)
'unsigned long int zone::compact_cached_migrate_pfn[2]' offset changed from 10880 to 11392 (in bits) (by +512 bits)
'unsigned int zone::compact_considered' offset changed from 11008 to 11648 (in bits) (by +640 bits)
'unsigned int zone::compact_defer_shift' offset changed from 11040 to 11680 (in bits) (by +640 bits)
'int zone::compact_order_failed' offset changed from 11072 to 11712 (in bits) (by +640 bits)
'bool zone::compact_blockskip_flush' offset changed from 11104 to 11744 (in bits) (by +640 bits)
'bool zone::contiguous' offset changed from 11112 to 11752 (in bits) (by +640 bits)
'zone_padding zone::_pad3_' offset changed from 11264 to 11776 (in bits) (by +512 bits)
'atomic_long_t zone::vm_stat[14]' offset changed from 11264 to 11776 (in bits) (by +512 bits)
'atomic_long_t zone::vm_numa_stat[]' offset changed from 12160 to 12672 (in bits) (by +512 bits)
1389 impacted interfaces
Fixes: c98dd3b1df ("ANDROID: GKI: mm: add cma pcp list")
Fixes: 165daa7b1c ("ANDROID: abi_gki_aarch64_whitelist: add module_layout and task_struct")
Signed-off-by: Matthias Maennich <maennich@google.com>
Change-Id: If3865bb846185e5bb96aed10d8563020ff4d0d98
The module_layout symbol is a special case that is always kept exported,
even with CONFIG_TRIM_UNUSED_KSYMS=y.
task_struct is special in a different way. It can be accessed without
the use of an exported symbol through direct register access.
Add them to the global whitelist to ensure they are kept stable.
Bug: 148277666
Bug: 147380000
Change-Id: Ib7ff326fd25da773e4dadc273ff60ec37b9f2bff
Signed-off-by: Matthias Maennich <maennich@google.com>
Add a cma pcp list in order to increase cma memory utilization.
Increased cma memory utilization will improve overall memory
utilization because free cma pages are ignored when memory reclaim
is done with gfp mask GFP_KERNEL.
Since most memory reclaim is done by kswapd, which uses a gfp mask
of GFP_KERNEL, by increasing cma memory utilization we are therefore
ensuring that less aggressive memory reclaim takes place.
Increased cma memory utilization will improve performance,
for example it will increase app concurrency.
Change-Id: I809589a25c6abca51f1c963f118adfc78e955cf9
Signed-off-by: Liam Mark <lmark@codeaurora.org>
[vinmenon@codeaurora.org: fix !CONFIG_CMA compile time issues]
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>
[swatsrid@codeaurora.org: Fix merge conflicts]
Signed-off-by: Swathi Sridhar <swatsrid@codeaurora.org>
(cherry picked from commit 0caf6be3e0842302ecd54c9e75943ca4133f4c7a)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 150378964
CMA pages are designed to be used as fallback for movable allocations
and cannot be used for non-movable allocations. If CMA pages are
utilized poorly, non-movable allocations may end up getting starved if
all regular movable pages are allocated and the only pages left are
CMA. Always using CMA pages first creates unacceptable performance
problems. As a midway alternative, use CMA pages for certain
userspace allocations. The userspace pages can be migrated or dropped
quickly which giving decent utilization.
Change-Id: I6165dda01b705309eebabc6dfa67146b7a95c174
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
[lauraa@codeaurora.org: Missing CONFIG_CMA guards, add commit text]
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
[lmark@codeaurora.org: resolve conflicts relating to MIGRATE_HIGHATOMIC]
Signed-off-by: Liam Mark <lmark@codeaurora.org>
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>
[swatsrid@codeaurora.org: Fix merge conflicts]
Signed-off-by: Swathi Sridhar <swatsrid@codeaurora.org>
(cherry picked from commit 46f8fca539686ce8493ff82206f9de2d07c9d72c)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 150378964
Pageblock hints are cleared when compaction restarts or kswapd makes
enough progress that it can sleep but it's over-eager in that the bit is
cleared for migration sources with no LRU pages and migration targets
with no free pages. As pageblock skip hint flushes are relatively rare
and out-of-band with respect to kswapd, this patch makes a few more
expensive checks to see if it's appropriate to even clear the bit.
Every pageblock that is not cleared will avoid 512 pages being scanned
unnecessarily on x86-64.
The impact is variable with different workloads showing small
differences in latency, success rates and scan rates. This is expected
as clearing the hints is not that common but doing a small amount of
work out-of-band to avoid a large amount of work in-band later is
generally a good thing.
Link: http://lkml.kernel.org/r/20190118175136.31341-22-mgorman@techsingularity.net
Signed-off-by: Mel Gorman <mgorman@techsingularity.net>
Signed-off-by: Qian Cai <cai@lca.pw>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Cc: David Rientjes <rientjes@google.com>
Cc: YueHaibing <yuehaibing@huawei.com>
[cai@lca.pw: no stuck in __reset_isolation_pfn()]
Link: http://lkml.kernel.org/r/20190206034732.75687-1-cai@lca.pw
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Change-Id: I27b3d1bf8100d0281ec297ef5ce79d100d0cb37e
Git-commit: e332f741a8
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
(cherry picked from commit e332f741a8)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 150378964
An external fragmentation event was previously described as
When the page allocator fragments memory, it records the event using
the mm_page_alloc_extfrag event. If the fallback_order is smaller
than a pageblock order (order-9 on 64-bit x86) then it's considered
an event that will cause external fragmentation issues in the future.
The kernel reduces the probability of such events by increasing the
watermark sizes by calling set_recommended_min_free_kbytes early in the
lifetime of the system. This works reasonably well in general but if
there are enough sparsely populated pageblocks then the problem can still
occur as enough memory is free overall and kswapd stays asleep.
This patch introduces a watermark_boost_factor sysctl that allows a zone
watermark to be temporarily boosted when an external fragmentation causing
events occurs. The boosting will stall allocations that would decrease
free memory below the boosted low watermark and kswapd is woken if the
calling context allows to reclaim an amount of memory relative to the size
of the high watermark and the watermark_boost_factor until the boost is
cleared. When kswapd finishes, it wakes kcompactd at the pageblock order
to clean some of the pageblocks that may have been affected by the
fragmentation event. kswapd avoids any writeback, slab shrinkage and swap
from reclaim context during this operation to avoid excessive system
disruption in the name of fragmentation avoidance. Care is taken so that
kswapd will do normal reclaim work if the system is really low on memory.
This was evaluated using the same workloads as "mm, page_alloc: Spread
allocations across zones before introducing fragmentation".
1-socket Skylake machine
config-global-dhp__workload_thpfioscale XFS (no special madvise)
4 fio threads, 1 THP allocating thread
--------------------------------------
4.20-rc3 extfrag events < order 9: 804694
4.20-rc3+patch: 408912 (49% reduction)
4.20-rc3+patch1-4: 18421 (98% reduction)
4.20.0-rc3 4.20.0-rc3
lowzone-v5r8 boost-v5r8
Amean fault-base-1 653.58 ( 0.00%) 652.71 ( 0.13%)
Amean fault-huge-1 0.00 ( 0.00%) 178.93 * -99.00%*
4.20.0-rc3 4.20.0-rc3
lowzone-v5r8 boost-v5r8
Percentage huge-1 0.00 ( 0.00%) 5.12 ( 100.00%)
Note that external fragmentation causing events are massively reduced by
this path whether in comparison to the previous kernel or the vanilla
kernel. The fault latency for huge pages appears to be increased but that
is only because THP allocations were successful with the patch applied.
1-socket Skylake machine
global-dhp__workload_thpfioscale-madvhugepage-xfs (MADV_HUGEPAGE)
-----------------------------------------------------------------
4.20-rc3 extfrag events < order 9: 291392
4.20-rc3+patch: 191187 (34% reduction)
4.20-rc3+patch1-4: 13464 (95% reduction)
thpfioscale Fault Latencies
4.20.0-rc3 4.20.0-rc3
lowzone-v5r8 boost-v5r8
Min fault-base-1 912.00 ( 0.00%) 905.00 ( 0.77%)
Min fault-huge-1 127.00 ( 0.00%) 135.00 ( -6.30%)
Amean fault-base-1 1467.55 ( 0.00%) 1481.67 ( -0.96%)
Amean fault-huge-1 1127.11 ( 0.00%) 1063.88 * 5.61%*
4.20.0-rc3 4.20.0-rc3
lowzone-v5r8 boost-v5r8
Percentage huge-1 77.64 ( 0.00%) 83.46 ( 7.49%)
As before, massive reduction in external fragmentation events, some jitter
on latencies and an increase in THP allocation success rates.
2-socket Haswell machine
config-global-dhp__workload_thpfioscale XFS (no special madvise)
4 fio threads, 5 THP allocating threads
----------------------------------------------------------------
4.20-rc3 extfrag events < order 9: 215698
4.20-rc3+patch: 200210 (7% reduction)
4.20-rc3+patch1-4: 14263 (93% reduction)
4.20.0-rc3 4.20.0-rc3
lowzone-v5r8 boost-v5r8
Amean fault-base-5 1346.45 ( 0.00%) 1306.87 ( 2.94%)
Amean fault-huge-5 3418.60 ( 0.00%) 1348.94 ( 60.54%)
4.20.0-rc3 4.20.0-rc3
lowzone-v5r8 boost-v5r8
Percentage huge-5 0.78 ( 0.00%) 7.91 ( 910.64%)
There is a 93% reduction in fragmentation causing events, there is a big
reduction in the huge page fault latency and allocation success rate is
higher.
2-socket Haswell machine
global-dhp__workload_thpfioscale-madvhugepage-xfs (MADV_HUGEPAGE)
-----------------------------------------------------------------
4.20-rc3 extfrag events < order 9: 166352
4.20-rc3+patch: 147463 (11% reduction)
4.20-rc3+patch1-4: 11095 (93% reduction)
thpfioscale Fault Latencies
4.20.0-rc3 4.20.0-rc3
lowzone-v5r8 boost-v5r8
Amean fault-base-5 6217.43 ( 0.00%) 7419.67 * -19.34%*
Amean fault-huge-5 3163.33 ( 0.00%) 3263.80 ( -3.18%)
4.20.0-rc3 4.20.0-rc3
lowzone-v5r8 boost-v5r8
Percentage huge-5 95.14 ( 0.00%) 87.98 ( -7.53%)
There is a large reduction in fragmentation events with some jitter around
the latencies and success rates. As before, the high THP allocation
success rate does mean the system is under a lot of pressure. However, as
the fragmentation events are reduced, it would be expected that the
long-term allocation success rate would be higher.
Link: http://lkml.kernel.org/r/20181123114528.28802-5-mgorman@techsingularity.net
Signed-off-by: Mel Gorman <mgorman@techsingularity.net>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: David Rientjes <rientjes@google.com>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Zi Yan <zi.yan@cs.rutgers.edu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Change-Id: Ied06272defcdbf3fff07b7ebccb46c68ce081e1e
Git-commit: 1c30844d2d
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
[vinmenon@codeaurora.org: trivial merge conflict fixes]
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
(cherry picked from commit 1c30844d2d)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 150378964
Patch series "Fragmentation avoidance improvements", v5.
It has been noted before that fragmentation avoidance (aka
anti-fragmentation) is not perfect. Given sufficient time or an adverse
workload, memory gets fragmented and the long-term success of high-order
allocations degrades. This series defines an adverse workload, a definition
of external fragmentation events (including serious) ones and a series
that reduces the level of those fragmentation events.
The details of the workload and the consequences are described in more
detail in the changelogs. However, from patch 1, this is a high-level
summary of the adverse workload. The exact details are found in the
mmtests implementation.
The broad details of the workload are as follows;
1. Create an XFS filesystem (not specified in the configuration but done
as part of the testing for this patch)
2. Start 4 fio threads that write a number of 64K files inefficiently.
Inefficiently means that files are created on first access and not
created in advance (fio parameterr create_on_open=1) and fallocate
is not used (fallocate=none). With multiple IO issuers this creates
a mix of slab and page cache allocations over time. The total size
of the files is 150% physical memory so that the slabs and page cache
pages get mixed
3. Warm up a number of fio read-only threads accessing the same files
created in step 2. This part runs for the same length of time it
took to create the files. It'll fault back in old data and further
interleave slab and page cache allocations. As it's now low on
memory due to step 2, fragmentation occurs as pageblocks get
stolen.
4. While step 3 is still running, start a process that tries to allocate
75% of memory as huge pages with a number of threads. The number of
threads is based on a (NR_CPUS_SOCKET - NR_FIO_THREADS)/4 to avoid THP
threads contending with fio, any other threads or forcing cross-NUMA
scheduling. Note that the test has not been used on a machine with less
than 8 cores. The benchmark records whether huge pages were allocated
and what the fault latency was in microseconds
5. Measure the number of events potentially causing external fragmentation,
the fault latency and the huge page allocation success rate.
6. Cleanup
Overall the series reduces external fragmentation causing events by over 94%
on 1 and 2 socket machines, which in turn impacts high-order allocation
success rates over the long term. There are differences in latencies and
high-order allocation success rates. Latencies are a mixed bag as they
are vulnerable to exact system state and whether allocations succeeded
so they are treated as a secondary metric.
Patch 1 uses lower zones if they are populated and have free memory
instead of fragmenting a higher zone. It's special cased to
handle a Normal->DMA32 fallback with the reasons explained
in the changelog.
Patch 2-4 boosts watermarks temporarily when an external fragmentation
event occurs. kswapd wakes to reclaim a small amount of old memory
and then wakes kcompactd on completion to recover the system
slightly. This introduces some overhead in the slowpath. The level
of boosting can be tuned or disabled depending on the tolerance
for fragmentation vs allocation latency.
Patch 5 stalls some movable allocation requests to let kswapd from patch 4
make some progress. The duration of the stalls is very low but it
is possible to tune the system to avoid fragmentation events if
larger stalls can be tolerated.
The bulk of the improvement in fragmentation avoidance is from patches
1-4 but patch 5 can deal with a rare corner case and provides the option
of tuning a system for THP allocation success rates in exchange for
some stalls to control fragmentation.
This patch (of 5):
The page allocator zone lists are iterated based on the watermarks of each
zone which does not take anti-fragmentation into account. On x86, node 0
may have multiple zones while other nodes have one zone. A consequence is
that tasks running on node 0 may fragment ZONE_NORMAL even though
ZONE_DMA32 has plenty of free memory. This patch special cases the
allocator fast path such that it'll try an allocation from a lower local
zone before fragmenting a higher zone. In this case, stealing of
pageblocks or orders larger than a pageblock are still allowed in the fast
path as they are uninteresting from a fragmentation point of view.
This was evaluated using a benchmark designed to fragment memory before
attempting THP allocations. It's implemented in mmtests as the following
configurations
configs/config-global-dhp__workload_thpfioscale
configs/config-global-dhp__workload_thpfioscale-defrag
configs/config-global-dhp__workload_thpfioscale-madvhugepage
e.g. from mmtests
./run-mmtests.sh --run-monitor --config configs/config-global-dhp__workload_thpfioscale test-run-1
The broad details of the workload are as follows;
1. Create an XFS filesystem (not specified in the configuration but done
as part of the testing for this patch).
2. Start 4 fio threads that write a number of 64K files inefficiently.
Inefficiently means that files are created on first access and not
created in advance (fio parameter create_on_open=1) and fallocate
is not used (fallocate=none). With multiple IO issuers this creates
a mix of slab and page cache allocations over time. The total size
of the files is 150% physical memory so that the slabs and page cache
pages get mixed.
3. Warm up a number of fio read-only processes accessing the same files
created in step 2. This part runs for the same length of time it
took to create the files. It'll refault old data and further
interleave slab and page cache allocations. As it's now low on
memory due to step 2, fragmentation occurs as pageblocks get
stolen.
4. While step 3 is still running, start a process that tries to allocate
75% of memory as huge pages with a number of threads. The number of
threads is based on a (NR_CPUS_SOCKET - NR_FIO_THREADS)/4 to avoid THP
threads contending with fio, any other threads or forcing cross-NUMA
scheduling. Note that the test has not been used on a machine with less
than 8 cores. The benchmark records whether huge pages were allocated
and what the fault latency was in microseconds.
5. Measure the number of events potentially causing external fragmentation,
the fault latency and the huge page allocation success rate.
6. Cleanup the test files.
Note that due to the use of IO and page cache that this benchmark is not
suitable for running on large machines where the time to fragment memory
may be excessive. Also note that while this is one mix that generates
fragmentation that it's not the only mix that generates fragmentation.
Differences in workload that are more slab-intensive or whether SLUB is
used with high-order pages may yield different results.
When the page allocator fragments memory, it records the event using the
mm_page_alloc_extfrag ftrace event. If the fallback_order is smaller than
a pageblock order (order-9 on 64-bit x86) then it's considered to be an
"external fragmentation event" that may cause issues in the future.
Hence, the primary metric here is the number of external fragmentation
events that occur with order < 9. The secondary metric is allocation
latency and huge page allocation success rates but note that differences
in latencies and what the success rate also can affect the number of
external fragmentation event which is why it's a secondary metric.
1-socket Skylake machine
config-global-dhp__workload_thpfioscale XFS (no special madvise)
4 fio threads, 1 THP allocating thread
--------------------------------------
4.20-rc3 extfrag events < order 9: 804694
4.20-rc3+patch: 408912 (49% reduction)
thpfioscale Fault Latencies
4.20.0-rc3 4.20.0-rc3
vanilla lowzone-v5r8
Amean fault-base-1 662.92 ( 0.00%) 653.58 * 1.41%*
Amean fault-huge-1 0.00 ( 0.00%) 0.00 ( 0.00%)
4.20.0-rc3 4.20.0-rc3
vanilla lowzone-v5r8
Percentage huge-1 0.00 ( 0.00%) 0.00 ( 0.00%)
Fault latencies are slightly reduced while allocation success rates remain
at zero as this configuration does not make any special effort to allocate
THP and fio is heavily active at the time and either filling memory or
keeping pages resident. However, a 49% reduction of serious fragmentation
events reduces the changes of external fragmentation being a problem in
the future.
Vlastimil asked during review for a breakdown of the allocation types
that are falling back.
vanilla
3816 MIGRATE_UNMOVABLE
800845 MIGRATE_MOVABLE
33 MIGRATE_UNRECLAIMABLE
patch
735 MIGRATE_UNMOVABLE
408135 MIGRATE_MOVABLE
42 MIGRATE_UNRECLAIMABLE
The majority of the fallbacks are due to movable allocations and this is
consistent for the workload throughout the series so will not be presented
again as the primary source of fallbacks are movable allocations.
Movable fallbacks are sometimes considered "ok" to fallback because they
can be migrated. The problem is that they can fill an
unmovable/reclaimable pageblock causing those allocations to fallback
later and polluting pageblocks with pages that cannot move. If there is a
movable fallback, it is pretty much guaranteed to affect an
unmovable/reclaimable pageblock and while it might not be enough to
actually cause a unmovable/reclaimable fallback in the future, we cannot
know that in advance so the patch takes the only option available to it.
Hence, it's important to control them. This point is also consistent
throughout the series and will not be repeated.
1-socket Skylake machine
global-dhp__workload_thpfioscale-madvhugepage-xfs (MADV_HUGEPAGE)
-----------------------------------------------------------------
4.20-rc3 extfrag events < order 9: 291392
4.20-rc3+patch: 191187 (34% reduction)
thpfioscale Fault Latencies
4.20.0-rc3 4.20.0-rc3
vanilla lowzone-v5r8
Amean fault-base-1 1495.14 ( 0.00%) 1467.55 ( 1.85%)
Amean fault-huge-1 1098.48 ( 0.00%) 1127.11 ( -2.61%)
thpfioscale Percentage Faults Huge
4.20.0-rc3 4.20.0-rc3
vanilla lowzone-v5r8
Percentage huge-1 78.57 ( 0.00%) 77.64 ( -1.18%)
Fragmentation events were reduced quite a bit although this is known
to be a little variable. The latencies and allocation success rates
are similar but they were already quite high.
2-socket Haswell machine
config-global-dhp__workload_thpfioscale XFS (no special madvise)
4 fio threads, 5 THP allocating threads
----------------------------------------------------------------
4.20-rc3 extfrag events < order 9: 215698
4.20-rc3+patch: 200210 (7% reduction)
thpfioscale Fault Latencies
4.20.0-rc3 4.20.0-rc3
vanilla lowzone-v5r8
Amean fault-base-5 1350.05 ( 0.00%) 1346.45 ( 0.27%)
Amean fault-huge-5 4181.01 ( 0.00%) 3418.60 ( 18.24%)
4.20.0-rc3 4.20.0-rc3
vanilla lowzone-v5r8
Percentage huge-5 1.15 ( 0.00%) 0.78 ( -31.88%)
The reduction of external fragmentation events is slight and this is
partially due to the removal of __GFP_THISNODE in commit ac5b2c1891
("mm: thp: relax __GFP_THISNODE for MADV_HUGEPAGE mappings") as THP
allocations can now spill over to remote nodes instead of fragmenting
local memory.
2-socket Haswell machine
global-dhp__workload_thpfioscale-madvhugepage-xfs (MADV_HUGEPAGE)
-----------------------------------------------------------------
4.20-rc3 extfrag events < order 9: 166352
4.20-rc3+patch: 147463 (11% reduction)
thpfioscale Fault Latencies
4.20.0-rc3 4.20.0-rc3
vanilla lowzone-v5r8
Amean fault-base-5 6138.97 ( 0.00%) 6217.43 ( -1.28%)
Amean fault-huge-5 2294.28 ( 0.00%) 3163.33 * -37.88%*
thpfioscale Percentage Faults Huge
4.20.0-rc3 4.20.0-rc3
vanilla lowzone-v5r8
Percentage huge-5 96.82 ( 0.00%) 95.14 ( -1.74%)
There was a slight reduction in external fragmentation events although the
latencies were higher. The allocation success rate is high enough that
the system is struggling and there is quite a lot of parallel reclaim and
compaction activity. There is also a certain degree of luck on whether
processes start on node 0 or not for this patch but the relevance is
reduced later in the series.
Overall, the patch reduces the number of external fragmentation causing
events so the success of THP over long periods of time would be improved
for this adverse workload.
Link: http://lkml.kernel.org/r/20181123114528.28802-2-mgorman@techsingularity.net
Signed-off-by: Mel Gorman <mgorman@techsingularity.net>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Cc: David Rientjes <rientjes@google.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Zi Yan <zi.yan@cs.rutgers.edu>
Cc: Michal Hocko <mhocko@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Change-Id: If804b49c46fe359ca6addacd4c3a8b36d8571ca6
Git-commit: 6bb154504f
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
(cherry picked from commit 6bb154504f)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 150378964
Leaf changes summary: 2 artifacts changed
Changed leaf types summary: 2 leaf types changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 0 Added function
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable
'struct ufs_hba at ufshcd.h:545:1' changed:
type size changed from 14528 to 14592 (in bits)
1 data member insertion:
'size_t ufs_hba::sg_entry_size', at offset 1920 (in bits) at ufshcd.h:593:1
there are data member changes:
'unsigned int ufs_hba::irq' offset changed from 1920 to 1984 (in bits) (by +64 bits)
'bool ufs_hba::is_irq_enabled' offset changed from 1952 to 2016 (in bits) (by +64 bits)
'unsigned int ufs_hba::quirks' offset changed from 1984 to 2048 (in bits) (by +64 bits)
'unsigned int ufs_hba::dev_quirks' offset changed from 2016 to 2080 (in bits) (by +64 bits)
'wait_queue_head_t ufs_hba::tm_wq' offset changed from 2048 to 2112 (in bits) (by +64 bits)
'wait_queue_head_t ufs_hba::tm_tag_wq' offset changed from 2240 to 2304 (in bits) (by +64 bits)
'unsigned long int ufs_hba::tm_condition' offset changed from 2432 to 2496 (in bits) (by +64 bits)
'unsigned long int ufs_hba::tm_slots_in_use' offset changed from 2496 to 2560 (in bits) (by +64 bits)
'uic_command* ufs_hba::active_uic_cmd' offset changed from 2560 to 2624 (in bits) (by +64 bits)
'mutex ufs_hba::uic_cmd_mutex' offset changed from 2624 to 2688 (in bits) (by +64 bits)
'completion* ufs_hba::uic_async_done' offset changed from 2880 to 2944 (in bits) (by +64 bits)
'u32 ufs_hba::ufshcd_state' offset changed from 2944 to 3008 (in bits) (by +64 bits)
'u32 ufs_hba::eh_flags' offset changed from 2976 to 3040 (in bits) (by +64 bits)
'u32 ufs_hba::intr_mask' offset changed from 3008 to 3072 (in bits) (by +64 bits)
'u16 ufs_hba::ee_ctrl_mask' offset changed from 3040 to 3104 (in bits) (by +64 bits)
'bool ufs_hba::is_powered' offset changed from 3056 to 3120 (in bits) (by +64 bits)
'bool ufs_hba::is_init_prefetch' offset changed from 3064 to 3128 (in bits) (by +64 bits)
'ufs_init_prefetch ufs_hba::init_prefetch_data' offset changed from 3072 to 3136 (in bits) (by +64 bits)
'work_struct ufs_hba::eh_work' offset changed from 3136 to 3200 (in bits) (by +64 bits)
'work_struct ufs_hba::eeh_work' offset changed from 3392 to 3456 (in bits) (by +64 bits)
'u32 ufs_hba::errors' offset changed from 3648 to 3712 (in bits) (by +64 bits)
'u32 ufs_hba::uic_error' offset changed from 3680 to 3744 (in bits) (by +64 bits)
'u32 ufs_hba::saved_err' offset changed from 3712 to 3776 (in bits) (by +64 bits)
'u32 ufs_hba::saved_uic_err' offset changed from 3744 to 3808 (in bits) (by +64 bits)
'ufs_stats ufs_hba::ufs_stats' offset changed from 3776 to 3840 (in bits) (by +64 bits)
'bool ufs_hba::silence_err_logs' offset changed from 8064 to 8128 (in bits) (by +64 bits)
'ufs_dev_cmd ufs_hba::dev_cmd' offset changed from 8128 to 8192 (in bits) (by +64 bits)
'ktime_t ufs_hba::last_dme_cmd_tstamp' offset changed from 9152 to 9216 (in bits) (by +64 bits)
'ufs_dev_info ufs_hba::dev_info' offset changed from 9216 to 9280 (in bits) (by +64 bits)
'bool ufs_hba::auto_bkops_enabled' offset changed from 9232 to 9296 (in bits) (by +64 bits)
'ufs_vreg_info ufs_hba::vreg_info' offset changed from 9280 to 9344 (in bits) (by +64 bits)
'list_head ufs_hba::clk_list_head' offset changed from 9536 to 9600 (in bits) (by +64 bits)
'bool ufs_hba::wlun_dev_clr_ua' offset changed from 9664 to 9728 (in bits) (by +64 bits)
'int ufs_hba::req_abort_count' offset changed from 9696 to 9760 (in bits) (by +64 bits)
'u32 ufs_hba::lanes_per_direction' offset changed from 9728 to 9792 (in bits) (by +64 bits)
'ufs_pa_layer_attr ufs_hba::pwr_info' offset changed from 9760 to 9824 (in bits) (by +64 bits)
'ufs_pwr_mode_info ufs_hba::max_pwr_info' offset changed from 9984 to 10048 (in bits) (by +64 bits)
'ufs_clk_gating ufs_hba::clk_gating' offset changed from 10240 to 10304 (in bits) (by +64 bits)
'u32 ufs_hba::caps' offset changed from 12032 to 12096 (in bits) (by +64 bits)
'devfreq* ufs_hba::devfreq' offset changed from 12096 to 12160 (in bits) (by +64 bits)
'ufs_clk_scaling ufs_hba::clk_scaling' offset changed from 12160 to 12224 (in bits) (by +64 bits)
'bool ufs_hba::is_sys_suspended' offset changed from 13568 to 13632 (in bits) (by +64 bits)
'bkops_status ufs_hba::urgent_bkops_lvl' offset changed from 13600 to 13664 (in bits) (by +64 bits)
'bool ufs_hba::is_urgent_bkops_lvl_checked' offset changed from 13632 to 13696 (in bits) (by +64 bits)
'rw_semaphore ufs_hba::clk_scaling_lock' offset changed from 13696 to 13760 (in bits) (by +64 bits)
'ufs_desc_size ufs_hba::desc_size' offset changed from 14016 to 14080 (in bits) (by +64 bits)
'atomic_t ufs_hba::scsi_block_reqs_cnt' offset changed from 14240 to 14304 (in bits) (by +64 bits)
'ufs_crypto_capabilities ufs_hba::crypto_capabilities' offset changed from 14272 to 14336 (in bits) (by +64 bits)
'ufs_crypto_cap_entry* ufs_hba::crypto_cap_array' offset changed from 14336 to 14400 (in bits) (by +64 bits)
'u32 ufs_hba::crypto_cfg_register' offset changed from 14400 to 14464 (in bits) (by +64 bits)
'keyslot_manager* ufs_hba::ksm' offset changed from 14464 to 14528 (in bits) (by +64 bits)
7 impacted interfaces
'struct utp_transfer_cmd_desc at ufshci.h:451:1' changed:
type size changed from 24576 to 8192 (in bits)
there are data member changes:
type 'ufshcd_sg_entry[128]' of 'utp_transfer_cmd_desc::prd_table' changed:
type name changed from 'ufshcd_sg_entry[128]' to 'u8[]'
array type size changed from 16384 to infinity
array type subrange 1 changed length from 128 to infinity
array element type 'struct ufshcd_sg_entry' changed:
entity changed from 'struct ufshcd_sg_entry' to 'typedef u8' at int-ll64.h:17:1
type size changed from 128 to 8 (in bits)
and size changed from 16384 to 0 (in bits) (by -16384 bits)
7 impacted interfaces
Bug: 129991660
Change-Id: I239c2c3bf5de37f4522922a24d46e921e1e2cbd7
Signed-off-by: Alistair Delva <adelva@google.com>
Even if the bridge module is not enabled, we may need the tracepoints
downstream in products that enable bridge.ko, so avoid defining the
export of these symbols based on a config option.
Bug: 150625937
Change-Id: Ib961fd6e353fe3bdfde11a38488568f42f1dbe7a
Signed-off-by: Alistair Delva <adelva@google.com>
This option was accidentally skipped when it was added on arm64.
Bug: 144867487
Change-Id: Ifa87a894954ec9a26d5ab40e7d18e2f2f5e4f416
Signed-off-by: Alistair Delva <adelva@google.com>
ov13850 camera module used by rk3288 evb board
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: I23ad3dcb06a9f5c748a9399f5d4e9e9b1936ca52
Modify the UFSHCD core to allow 'struct ufshcd_sg_entry' to be
variable-length. The default is the standard length, but variants can
override ufs_hba::sg_entry_size with a larger value if there are
vendor-specific fields following the standard ones.
This is needed to support inline encryption with ufs-exynos (FMP).
Bug: 129991660
Signed-off-by: Eric Biggers <ebiggers@google.com>
(cherry picked from android-mainline
commit 8de80df7d7)
(resolved trivial merge conflict in ufshcd_alloc_host())
Change-Id: I6ab9458d5c23331013e6b736d6fea378a6b5b86c
Signed-off-by: Eric Biggers <ebiggers@google.com>
This is a partial revert of Change-Id
I6943cf6b1fedc2b82332c1dcf9a91281a3ca5627.
Bug: 139431025
Test: Treehugger
Signed-off-by: Ram Muthiah <rammuthiah@google.com>
Change-Id: I2ebbe2f20e318cb01206ccbd8c6a5803f7f503b6
Cuttlefish and Goldfish both rely on the virtio console and
HVC_DRIVER is a binary config which is a dep for that driver.
Bug: 150620456
Test: Treehugger
Signed-off-by: Ram Muthiah <rammuthiah@google.com>
Change-Id: I54e7d95da4fcddd534d0f0f48b5c546cd2f2718d
Goldfish and Cuttlefish already use software encrytion drivers and
don't use this one.
Bug: 150620456
Test: Treehugger
Signed-off-by: Ram Muthiah <rammuthiah@google.com>
Change-Id: I72b0155b5db9bc54bfca0ed99734b7c2c513ceac
This binary module gets enabled if BRIDGE, a tristate config, gets
enabled as either a builtin or y. This dependent config should also
be tristate but it seems like that hasn't been done upstream yet.
Bug: 150620456
Test: Treehugger
Signed-off-by: Ram Muthiah <rammuthiah@google.com>
Change-Id: I699b73bfac8a0c6cb5e14fefe56b6c013e2410a8
The check to ensure that the new written value into cpu.uclamp.{min,max}
is within range, [0:100], wasn't working because of the signed
comparison
7301 if (req.percent > UCLAMP_PERCENT_SCALE) {
7302 req.ret = -ERANGE;
7303 return req;
7304 }
# echo -1 > cpu.uclamp.min
# cat cpu.uclamp.min
42949671.96
Cast req.percent into u64 to force the comparison to be unsigned and
work as intended in capacity_from_percent().
# echo -1 > cpu.uclamp.min
sh: write error: Numerical result out of range
Bug: 120440300
Fixes: 2480c09313 ("sched/uclamp: Extend CPU's cgroup controller")
Signed-off-by: Qais Yousef <qais.yousef@arm.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lkml.kernel.org/r/20200114210947.14083-1-qais.yousef@arm.com
(cherry picked from commit b562d14064)
Signed-off-by: Qais Yousef <qais.yousef@arm.com>
Change-Id: I17fc2b119dcbffb212e130ed2c37ae3a8d5bbb61
Changes in 4.19.107
iommu/qcom: Fix bogus detach logic
ALSA: hda: Use scnprintf() for printing texts for sysfs/procfs
ALSA: hda/realtek - Apply quirk for MSI GP63, too
ALSA: hda/realtek - Apply quirk for yet another MSI laptop
ASoC: sun8i-codec: Fix setting DAI data format
ecryptfs: fix a memory leak bug in parse_tag_1_packet()
ecryptfs: fix a memory leak bug in ecryptfs_init_messaging()
thunderbolt: Prevent crash if non-active NVMem file is read
USB: misc: iowarrior: add support for 2 OEMed devices
USB: misc: iowarrior: add support for the 28 and 28L devices
USB: misc: iowarrior: add support for the 100 device
floppy: check FDC index for errors before assigning it
vt: fix scrollback flushing on background consoles
vt: selection, handle pending signals in paste_selection
vt: vt_ioctl: fix race in VT_RESIZEX
staging: android: ashmem: Disallow ashmem memory from being remapped
staging: vt6656: fix sign of rx_dbm to bb_pre_ed_rssi.
xhci: Force Maximum Packet size for Full-speed bulk devices to valid range.
xhci: fix runtime pm enabling for quirky Intel hosts
xhci: Fix memory leak when caching protocol extended capability PSI tables - take 2
usb: host: xhci: update event ring dequeue pointer on purpose
USB: core: add endpoint-blacklist quirk
USB: quirks: blacklist duplicate ep on Sound Devices USBPre2
usb: uas: fix a plug & unplug racing
USB: Fix novation SourceControl XL after suspend
USB: hub: Don't record a connect-change event during reset-resume
USB: hub: Fix the broken detection of USB3 device in SMSC hub
usb: dwc2: Fix SET/CLEAR_FEATURE and GET_STATUS flows
usb: dwc3: gadget: Check for IOC/LST bit in TRB->ctrl fields
staging: rtl8188eu: Fix potential security hole
staging: rtl8188eu: Fix potential overuse of kernel memory
staging: rtl8723bs: Fix potential security hole
staging: rtl8723bs: Fix potential overuse of kernel memory
powerpc/tm: Fix clearing MSR[TS] in current when reclaiming on signal delivery
jbd2: fix ocfs2 corrupt when clearing block group bits
x86/mce/amd: Publish the bank pointer only after setup has succeeded
x86/mce/amd: Fix kobject lifetime
x86/cpu/amd: Enable the fixed Instructions Retired counter IRPERF
serial: 8250: Check UPF_IRQ_SHARED in advance
tty/serial: atmel: manage shutdown in case of RS485 or ISO7816 mode
tty: serial: imx: setup the correct sg entry for tx dma
serdev: ttyport: restore client ops on deregistration
MAINTAINERS: Update drm/i915 bug filing URL
Revert "ipc,sem: remove uneeded sem_undo_list lock usage in exit_sem()"
mm/memcontrol.c: lost css_put in memcg_expand_shrinker_maps()
nvme-multipath: Fix memory leak with ana_log_buf
genirq/irqdomain: Make sure all irq domain flags are distinct
mm/vmscan.c: don't round up scan size for online memory cgroup
drm/amdgpu/soc15: fix xclk for raven
xhci: apply XHCI_PME_STUCK_QUIRK to Intel Comet Lake platforms
KVM: nVMX: Don't emulate instructions in guest mode
KVM: x86: don't notify userspace IOAPIC on edge-triggered interrupt EOI
tty: serial: qcom_geni_serial: Fix UART hang
tty: serial: qcom_geni_serial: Remove interrupt storm
tty: serial: qcom_geni_serial: Remove use of *_relaxed() and mb()
tty: serial: qcom_geni_serial: Remove set_rfr_wm() and related variables
tty: serial: qcom_geni_serial: Remove xfer_mode variable
tty: serial: qcom_geni_serial: Fix RX cancel command failure
lib/stackdepot.c: fix global out-of-bounds in stack_slabs
drm/nouveau/kms/gv100-: Re-set LUT after clearing for modesets
ext4: fix a data race in EXT4_I(inode)->i_disksize
ext4: add cond_resched() to __ext4_find_entry()
ext4: fix potential race between online resizing and write operations
ext4: fix potential race between s_group_info online resizing and access
ext4: fix potential race between s_flex_groups online resizing and access
ext4: fix mount failure with quota configured as module
ext4: rename s_journal_flag_rwsem to s_writepages_rwsem
ext4: fix race between writepages and enabling EXT4_EXTENTS_FL
KVM: nVMX: Refactor IO bitmap checks into helper function
KVM: nVMX: Check IO instruction VM-exit conditions
KVM: nVMX: handle nested posted interrupts when apicv is disabled for L1
KVM: apic: avoid calculating pending eoi from an uninitialized val
btrfs: fix bytes_may_use underflow in prealloc error condtition
btrfs: reset fs_root to NULL on error in open_ctree
btrfs: do not check delayed items are empty for single transaction cleanup
Btrfs: fix btrfs_wait_ordered_range() so that it waits for all ordered extents
Revert "dmaengine: imx-sdma: Fix memory leak"
scsi: Revert "RDMA/isert: Fix a recently introduced regression related to logout"
scsi: Revert "target: iscsi: Wait for all commands to finish before freeing a session"
usb: gadget: composite: Fix bMaxPower for SuperSpeedPlus
usb: dwc2: Fix in ISOC request length checking
staging: rtl8723bs: fix copy of overlapping memory
staging: greybus: use after free in gb_audio_manager_remove_all()
ecryptfs: replace BUG_ON with error handling code
iommu/vt-d: Fix compile warning from intel-svm.h
genirq/proc: Reject invalid affinity masks (again)
bpf, offload: Replace bitwise AND by logical AND in bpf_prog_offload_info_fill
ALSA: rawmidi: Avoid bit fields for state flags
ALSA: seq: Avoid concurrent access to queue flags
ALSA: seq: Fix concurrent access to queue current tick/time
netfilter: xt_hashlimit: limit the max size of hashtable
rxrpc: Fix call RCU cleanup using non-bh-safe locks
ata: ahci: Add shutdown to freeze hardware resources of ahci
xen: Enable interrupts when calling _cond_resched()
s390/mm: Explicitly compare PAGE_DEFAULT_KEY against zero in storage_key_init_range
Revert "char/random: silence a lockdep splat with printk()"
Linux 4.19.107
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I74e3d49c54d4afcfa4049042163cb879c3de3100
Disable CONFIG_RT_GROUP_SCHED to control RT cpu allowance globally.
ABI update report:
ABI DIFFERENCES HAVE BEEN DETECTED! (RC=8)
========================================================
Leaf changes summary: 2 artifacts changed
Changed leaf types summary: 2 leaf types changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 0 Added function
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable
'struct sched_rt_entity at sched.h:481:1' changed:
type size changed from 576 to 384 (in bits)
3 data member deletions:
'sched_rt_entity* sched_rt_entity::parent', at offset 384 (in bits) at sched.h:491:1
'rt_rq* sched_rt_entity::rt_rq', at offset 448 (in bits) at sched.h:493:1
'rt_rq* sched_rt_entity::my_q', at offset 512 (in bits) at sched.h:495:1
1033 impacted interfaces
========================================================
Bug: 149954332
Change-Id: I9487bd113502e52f19637e43109433cb13e97a23
Signed-off-by: Suren Baghdasaryan <surenb@google.com>