Define vm.swappiness according to zram and frontswap (zswap) definition.
mpokwsths authored
Implement ck1 patchset, fixed build with it
mm, memcg: give exiting processes access to memory reserves

commit 465adcf1ea7b2e49b2e0899366624f5532b64012

A memcg may livelock when oom if the process that grabs the hierarchy's
oom lock is never the first process with PF_EXITING set in the memcg's
task iteration.

The oom killer, both global and memcg, will defer if it finds an
eligible process that is in the process of exiting and it is not being
ptraced.  The idea is to allow it to exit without using memory reserves
before needlessly killing another process.

This normally works fine except in the memcg case with a large number of
threads attached to the oom memcg.  In this case, the memcg oom killer
only gets called for the process that grabs the hierarchy's oom lock;
all others end up blocked on the memcg's oom waitqueue.  Thus, if the
process that grabs the hierarchy's oom lock is never the first
PF_EXITING process in the memcg's task iteration, the oom killer is
constantly deferred without anything making progress.

The fix is to give PF_EXITING processes access to memory reserves so
that we've marked them as oom killed without any iteration.  This allows
__mem_cgroup_try_charge() to succeed so that the process may exit.  This
makes the memcg oom killer exemption for TIF_MEMDIE tasks, now
immediately granted for processes with pending SIGKILLs and those in the
exit path, to be equivalent to what is done for the global oom killer.

Signed-off-by: David Rientjes <rientjes@google.com>
Acked-by: Michal Hocko <mhocko@suse.cz>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
[Qiang: backported to 3.4:
 - move the changes from memcontrol.c to oom_kill.c]
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
md:dm.c Fix warning: statement with no effect
Revert "bcmdhd: workaround broken AC video queue in IBSS mode"

This reverts commit c947adee9fc71174c9e7af147c954a389f1d9e2d.
Revert "net: wireless: bcmdhd: Fix WEP-104 authentication"

This reverts commit b717e772d7853d73c88ccbebc3384e55261075a6.
Revert "net: wireless: bcmdhd: Reduce keep-alive period to 28 sec"

This reverts commit 3447015d3d38adc69d3e5d133100f0d3b6ea73fd.
Revert "bcmdhd : add adhoc support"

This reverts commit e5c47fa096b2e54a404422f225aaf321aa0a19b4.
net: wireless: bcmdhd: Update to version 1.88.45

	1. Remove WL_SUPPORT_AUTO_CHANNEL codes
	2. add codes for WL_IFACE_COMB_NUM_CHANNELS and
	   WL_CFG80211_P2P_DEV_IF to support concurent mode.
	   (Google Bug : [9892309] support Wifi direct 5GHZ channels)
	   but, remove the WL_IFACE_COM_NUM_CHANELS in Makefile
	3. refactoring the codes for hidden ap roaming
Signed-off-by: Ecco Park <eccopark@broadcom.com>

Conflicts:
	drivers/net/wireless/bcmdhd/Makefile
	drivers/net/wireless/bcmdhd/wl_android.c
	drivers/net/wireless/bcmdhd/wl_cfg80211.c
	drivers/net/wireless/bcmdhd/wl_cfgp2p.c
	drivers/net/wireless/bcmdhd/wl_cfgp2p.h

Change-Id: If8283f26714196aa971c186c57758c0e64ce87df

Conflicts:
	drivers/net/wireless/bcmdhd/wl_cfg80211.c
net: wireless: bcmdhd: enable WL_IFACE_COMB_NUM_CHANNELS

Signed-off-by: Ecco Park <eccopark@broadcom.com>
net: wireless: bcmdhd: Update Location Service code

	updated the dhd_pno.c based on new firmware which will be
	released today.
	updated the wl_anroid.c based on Robert's requirement

Signed-off-by: Ecco Park <eccopark@broadcom.com>

Conflicts:
	drivers/net/wireless/bcmdhd/common/include/proto/bcmevent.h

Change-Id: I270755fe4c041ea1282afaed9d120c9b83c2bc0c
net: wireless: bcmdhd: Fix of Wireless Location Service

	Fixed [10378803] [BATCHED-SCAN] WLS_BATCHING commands often
	return their command back rather than expected outputs
Signed-off-by: Ecco Park <eccopark@broadcom.com>
net: wireless: bcmdhd: Fix of Wireless Location Service

	Fixed memory Leak in case of rmmod DHD without batching stop.
Signed-off-by: Ecco Park <eccopark@broadcom.com>
net: wireless: bcmdhd: new feature for Roaming.

	1) The functionality help to prevent the device from doing roam
	scan forever in the environment which has just one AP nearbyt,
	but the RSSI of the AP is -75dbm ~ 78dbm
	2) The feature will set the roam trigger from -75dbm to -85dbm
	in case that there are only one AP.
	3) The value will be reset to -75dbm after disconnecting from
	current AP.
	4) This patch will Fixed Google issue: [10718651]
	   WiFi draining battery life even while phone connected to charge
	5) Enable flow control in DHD driver to fix
	   10430352 UDP speed is less than 40% of TCP speed with LInksys
	   WRT110
Signed-off-by: Ecco Park <eccopark@broadcom.com>
net: wireless: bcmdhd: Fixed Coverity issue.

Signed-off-by: Ecco Park <eccopark@broadcom.com>
net: wireless: bcmdhd: Fixed Wi-Fi Location Service issues.

	1. 10954142 [BATCHED-SCAN]Wifi Batching stopped after long time
	2. 10412309 [BATCHED-SCAN] Batched scans aren't as frequent as
	expected.
Signed-off-by: Ecco Park <eccopark@broadcom.com>
net: wireless: bcmdhd: add code for WLS service.

	add protection code to fix the issue#11051053
	( [Issue 11051053] [BATCHED-SCAN] Batched scan results
	become 	unavailable after disabling/re-enabling wifi scan)
Signed-off-by: Ecco Park <eccopark@broadcom.com>
net: wireless: bcmdhd: Fix country checking

Bug: 11319610

Change-Id: I5c52ed594614d8039f167de3c98bd9f802b521df
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
net: wireless: bcmdhd: fixed power consumption issue of P2P.

	solution : add wake_lock not to go to suspend during removing P2P GO
	interface in wl_cfg80211.c.
	Description of this issue :
	if device goes to suspend during removing the interface,
	we will fail to remove P2P GO virtual
	interface(p2p-p2p0-0).
	This will causes P2P GO still alive in firmware
	Bugnizer case id : 10874302
	This issue is reported by LG team.
Signed-off-by: Ecco Park <eccopark@broadcom.com>
net: wireless: bcmdhd: Fixed a problem of buganizer issue (11190960)

	Problem : if PNO scan occurs in Driver after p2p scan,
		  we failed to do PNO scan
	Root cause : In the wl_run_escan function, we still goes into
	p2p scan code even though current scan is PNO which is kind of
	legacy scan.

	Solution : we need to clear the staus of P2P scan before doing
	PNO SCAN.

Signed-off-by: Ecco Park <eccopark@broadcom.com>