There is a race during page offline that can lead to infinite loop:
a page never ends up on a buddy list and __offline_pages() keeps
retrying infinitely or until a termination signal is received.
Thread#1 - a new process:
load_elf_binary
begin_new_exec
exec_mmap
mmput
exit_mmap
tlb_finish_mmu
tlb_flush_mmu
release_pages
free_unref_page_list
free_unref_page_prepare
set_pcppage_migratetype(page, migratetype);
// Set page->index migration type below MIGRATE_PCPTYPES
Thread#2 - hot-removes memory
__offline_pages
start_isolate_page_range
set_migratetype_isolate
set_pageblock_migratetype(page, MIGRATE_ISOLATE);
Set migration type to MIGRATE_ISOLATE-> set
drain_all_pages(zone);
// drain per-cpu page lists to buddy allocator.
Thread#1 - continue
free_unref_page_commit
migratetype = get_pcppage_migratetype(page);
// get old migration type
list_add(&page->lru, &pcp->lists[migratetype]);
// add new page to already drained pcp list
Thread#2
Never drains pcp again, and therefore gets stuck in the loop.
The fix is to try to drain per-cpu lists again after
check_pages_isolated_cb() fails.
Change-Id: I7d9b42fdbf436458242385f795126e42294562b1
Fixes: c52e75935f ("mm: remove extra drain pages on pcp list")
Signed-off-by: Pavel Tatashin <pasha.tatashin@soleen.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: David Rientjes <rientjes@google.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Acked-by: Michal Hocko <mhocko@suse.com>
Acked-by: David Hildenbrand <david@redhat.com>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: Wei Yang <richard.weiyang@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lkml.kernel.org/r/20200903140032.380431-1-pasha.tatashin@soleen.com
Link: https://lkml.kernel.org/r/20200904151448.100489-2-pasha.tatashin@soleen.com
Link: http://lkml.kernel.org/r/20200904070235.GA15277@dhcp22.suse.cz
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Git-Commit: 9683182612214aa5f5e709fad49444b847cd866a
Git-Repo: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>
Check qcg before dereferencing to avoid NULL pointer
dereference and return if its NULL. This is is to
fix below kw warnings.
ufs-qcom.c:2489: 'qcg' is assigned the return value from
function 'cpu_to_group'.
ufs-qcom.c:2439: 'cpu_to_group' explicitly returns
a NULL value.
ufs-qcom.c:2490: 'qcg' is explicitly dereferenced.
Change-Id: I291c9230bb7fb5df414db8f80bfb17a50c8fc7cf
Signed-off-by: Nitin Rawat <nitirawa@codeaurora.org>
Add support for global clock controller for peripheral
clock clients to be able to request for the clocks.
Change-Id: If68b92b5f599c06412434dacb0e438e5d8aaa5f5
Signed-off-by: Jagadeesh Kona <jkona@codeaurora.org>
If PCIe link is down, skip setting wlaon_pwr_ctrl registers to avoid
unclocked access.
Change-Id: I156f936ad87089754d6644d2eb3199105065ee32
Signed-off-by: Yue Ma <yuem@codeaurora.org>
Enable USB PD config flag on sdxlemur to add
PD support.
Change-Id: If7a91abb4c6d1b0f368a931c9c686012a310eb99
Signed-off-by: Elson Roy Serrao <eserrao@codeaurora.org>
Calling SSR unregister for other peripherals from glink_ssr device remove
call back results in deadlock if multiple SSRs happens in parallel.
SSR unregister is defer to other worker to avoid notifier SRCU deadlock.
Change-Id: Ifa5c461201eec4b4beb8bf405bd0a2904a2cc90f
Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org>
Signed-off-by: Sarannya S <sarannya@codeaurora.org>
Get kernel time during start and end of map create
to keep track of time taken to create map. The time
variables are added as member of map struct. Same
time variables are added for buffers also.
Change-Id: I6454f5b60bec1a24a43ea1b7539ec45ba5358f2e
Acked-by: Ekansh Gupta <ekangupt@qti.qualcomm.com>
Signed-off-by: Jeya R <jeyr@codeaurora.org>
Add clock ids for GCC/DISPCC/GPUCC for clients to be able
to request for clocks from these clock controllers for
monaco.
Change-Id: Ie09a5a7a5fd1101fb863e836a0e554198e699511
Signed-off-by: Saurabh Sahu <sausah@codeaurora.org>
For QMI dpm port to open, control manager needs
to know about usb/mhi ep details corresponding to
RMNET and RMNET_CV2X tethering.
IPA driver has all endpoint info at one place.
- provide IOCTL interface to get ep_pair info.
- Add support for new dtsi entry specifying auto config.
- Add support in ipa-usb driver for rmnet_cv2x.
Change-Id: Ia5ec0df955ef7794ca992129dab538f65af36211
Signed-off-by: Mohammed Javid <mjavid@codeaurora.org>
Shortcut forward Engine (SFE) is a software packet accelerator
It depends on packet tuple entries based on conntrack information
The change adds its config entry in net Kconfig.
Change-Id: Ied018e83e26f69682590989242b333754f367556
Signed-off-by: Aman Gupta <amangupt@codeaurora.org>
Update bus voting for sdxlemur nand driver with the new icb framework.
Change-Id: I59108be9545780adc5f9040f97ae0d07536cc6bf
Signed-off-by: Sarthak Garg <sartgarg@codeaurora.org>
As per current code, pm_lvl is read from DT on every probe
during system resume after suspend.
Therefore, rpm_lvl and spm_lvl updated by sysfs will be overwritten
with the pm_lvl read from DT during probe after resume from
system suspend.
To avoid this read pm_lvl from DT only when current pm_lvl
is invalid or during the first ufs probe after boot.
Change-Id: I059d574a81d0e0f7cee8b6492e495819579a2d4c
Signed-off-by: Nitin Rawat <nitirawa@codeaurora.org>
Enable SPMI debug bus driver which is useful for writing to PMIC
peripheral registers over debug bus on devices when the fuse is
not blown. While at it, enable CONFIG_SPMI_MSM_PMIC_ARB as well
explicitly though it's selected for sdxlemur already.
Change-Id: I8d04c96efcdb089f8950e57fd1b152cd1cc5a84f
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>