The "ch->ch_bd" is already assined to "bd" but this is only
for checking null or MAGIC number.
in the dgnc_tty_ioctl function, bd can be used for referencing
to board_ops structure.
Tetsuo Handa [Tue, 8 Mar 2016 11:01:32 +0000 (20:01 +0900)]
android,lowmemorykiller: Don't abuse TIF_MEMDIE.
Currently, lowmemorykiller (LMK) is using TIF_MEMDIE for two purposes.
One is to remember processes killed by LMK, and the other is to
accelerate termination of processes killed by LMK.
But since LMK is invoked as a memory shrinker function, there still
should be some memory available. It is very likely that memory
allocations by processes killed by LMK will succeed without using
ALLOC_NO_WATERMARKS via TIF_MEMDIE. Even if their allocations cannot
escape from memory allocation loop unless they use ALLOC_NO_WATERMARKS,
lowmem_deathpending_timeout can guarantee forward progress by choosing
next victim process.
On the other hand, mark_oom_victim() assumes that it must be called with
oom_lock held and it must not be called after oom_killer_disable() was
called. But LMK is calling it without holding oom_lock and checking
oom_killer_disabled. It is possible that LMK calls mark_oom_victim()
due to allocation requests by kernel threads after current thread
returned from oom_killer_disabled(). This will break synchronization
for PM/suspend.
This patch introduces per a task_struct flag for remembering processes
killed by LMK, and replaces TIF_MEMDIE with that flag. By applying this
patch, assumption by mark_oom_victim() becomes true.
Merge tag 'iio-for-4.7a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next
Jonathan writes:
First round of IIO new device support, features and cleanups for the 4.7 cycle.
New core support
* UV light modifier (for intensity)
* UV light index channel type.
New device support
* hp206c barometer and altimeter
- new driver.
* mcp4131 potentiometer
- new driver supporting lots of parts from Microchip.
* mma8452
- FXLS8471Q support
- NXP LPC18XX SOC ADC
- new driver.
- NXP LPC18XX SOC DAC
- new driver.
- rockchip_saradc
- support rk3399
* st accel
- h3lis331dl support
Staging driver removals
* adis16204
- obsolete part making it hard to get parts to test the driver in order
to clean it up.
* adis16220
- obsolete part making it hard to get the parts test the driver in order
to clean it up.
Features
* core
- convenience functions to claim / release direct access to the device.
Makes more consistent handling of this corner easier. Used in ad7192 driver.
* ak8975
- power regulator support.
* at91-sama5d2
- differential channel support.
* mma8452
- runtime pm support
- drop device specific autosleep and use the runtime pm one instead.
* ms5611
- DT bindings
- oversampling ratio support
Cleanups and minor fixes
* MAINTAINERS
- Peter got married - hence name change!
* Documentation
- Fix a typo in in_proximity_raw description.
- Add some missing docs for iio_buffer_access_funcs.
* Tools
- update iio_event_monitor names to match new stuff.
- make generic_buffer look for triggers ending in -trigger as we let these in
for a number of drivers a long time back and now it is a fairly common
option.
Drivers
* staging wide
- convert bare unsigned usage to unsigned int to comply with coding style.
* non staging wide:
- since boiler plate gpio handling of interrupts has been moved into the
ACPI core we don't need to include gpio/consumer.h in a load of drivers so
drop it.
* ad7606
- fix an endian casting sparse warning.
* ak8975
- fix a possible unitialized warning from gcc.
- drop and unused field left over from earlier cleanups
- fix a missing regulator_disable on exit.
* at91-sama5d2
- typo and indentation
- missing IOMEM dependency.
- cleanup mode register usage by avoidling erasing whole thing when changing
the sampling frequency.
* bmc150
- use the core demux and available_scan_masks to simplify buffer handling
- optimize the transfers in the trigger handler now we have a magic function
to emulate bulk reads (under circumstances met here). This matters with some
rather dumb i2c adapters in particular.
- use a single regmap_conf for all bus types as they were all the same.
* bmg160
- use the core demux and available_scan_masks to simplify the buffer handling
- optimize the transfers in the trigger handler now we have a magic funciton
to emulate bulk rads (under circumstances met here).
- drop gpio interrupt probing from the driver (ACPI) as now handled by the
ACPI core.
* ina2xx-adc
- update the CALIB register when RShunt changes.
- fix scale for VShunt - in reality this error canceled out when used.
* isl29028
- use regmap to retrieve the struct device instead of carrying a second
copy of it around.
* kxcjk-1013
- use core demux
- optimize i2c transfers in the trigger handler.
* mcp4531
- refactor to use a pointer to access model parameters instead of indexing
into the array each time.
* mma8452
- style fixes
- avoid swtiching to active whenever the config changes
- add missin i2c_device_id for mma8451
* mpu6050
- fix possible NULL dereference.
- fix the name / chip_id used when ACPI used (otherwise reports as NULL).
* ms5611
- fix a missing regulator_disable that left the regulator on during removal.
* mxc4005
- drop gpio interrupt handling for ACPI case from driver as the core now
handles this case.
* st-sensors
- note that there are only ever a maximum of 3 axis on current st-sensors
so just allocate a fixed sized buffer big enough for that.
* tpl0102
- change the i2c_check_functionality condition to bring it inline with other
IIO users as EOPNOTSUPP.
* tsl2563
- replace deprecated flush_scheduled_work
Irina Tirdea [Tue, 29 Mar 2016 12:21:21 +0000 (15:21 +0300)]
iio: accel: bmc150: use common definition for regmap conf
bmc150_i2c_regmap_conf is defined three times (in bmc150-accel-core.c,
bmc150-accel-i2c.c and and bmc150-accel-spi.c), although the
definition is the same.
Use one common definition for bmc150_i2c_regmap_conf in all
included files.
Signed-off-by: Irina Tirdea <irina.tirdea@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
iio: buffer: add missing descriptions in iio_buffer_access_funcs
The members buffer_group and attrs of iio_buffer_access_funcs have no
descriptions for the documentation. Adding them.
Fixes: 08e7e0adaa17 ("iio: buffer: Allocate standard attributes in the core") Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Linus Walleij [Thu, 24 Mar 2016 08:39:14 +0000 (09:39 +0100)]
iio: tools: make generic_buffer look for "-trigger"
All the ST Sensors use the old "<foo>-trigger" rather than the
standard "<foo>-devN" new standard suffix for triggers. Now much
to do about it since it is ABI, but make the testing tools
recognize it too.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Irina Tirdea [Thu, 24 Mar 2016 09:05:09 +0000 (11:05 +0200)]
iio: remove gpio interrupt probing from drivers that use a single interrupt
Commit 845c877009cf014b ("i2c / ACPI: Assign IRQ for devices that have
GpioInt automatically") automatically assigns the first ACPI GPIO
interrupt in client->irq, so we can remove the probing code from
drivers that use only one interrupt.
Commit 0f0796509c07c1c7 ("iio: remove gpio interrupt probing from drivers
that use a single interrupt") removes gpio interrupt probing from most
drivers. This patch cleans the remaining ones.
Signed-off-by: Irina Tirdea <irina.tirdea@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Irina Tirdea [Thu, 24 Mar 2016 09:08:38 +0000 (11:08 +0200)]
iio: remove unused gpio consumer.h include
GPIO handling code has been removed from the drivers (since
this is now handled by the ACPI core) in commit 0f0796509c07 ("iio:
remove gpio interrupt probing from drivers that use a single interrupt").
Remove the include for linux/gpio/consumer.h since it is no longer
used.
Signed-off-by: Irina Tirdea <irina.tirdea@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Adriana Reus [Thu, 24 Mar 2016 09:29:31 +0000 (11:29 +0200)]
iio: accel: kxcjk-1013: optimize i2c transfers in trigger handler
Some i2c busses (e.g.: Synopsys DesignWare I2C adapter) need to
enable/disable the bus at each i2c transfer and must wait for
the enable/disable to happen before sending the data.
When reading data in the trigger handler, the kxcjk-1013 accel driver
does one i2c transfer for each axis. This has an impact on the
frequency of the accelerometer at high sample rates due to additional
delays introduced by the i2c bus at each transfer.
Reading all axis values in one i2c transfer reduces the delays
introduced by the i2c bus. Uses i2c_smbus_read_i2c_block_data_or_emulated
that will fallback to reading each axis as a separate word in case i2c
block read is not supported.
Signed-off-by: Adriana Reus <adriana.reus@intel.com> Signed-off-by: Irina Tirdea <irina.tirdea@intel.com> Acked-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Adriana Reus [Thu, 24 Mar 2016 09:29:30 +0000 (11:29 +0200)]
iio: accel: kxcjk-1013: use available_scan_masks
Use available_scan_masks to allow the iio core to select
the data to send to userspace depending on which axes are
enabled, instead of doing this in the driver's interrupt
handler.
Irina Tirdea [Thu, 24 Mar 2016 09:29:29 +0000 (11:29 +0200)]
iio: accel: bmg160: optimize transfers in trigger handler
Some i2c busses (e.g.: Synopsys DesignWare I2C adapter) need to
enable/disable the bus at each i2c transfer and must wait for
the enable/disable to happen before sending the data.
When reading data in the trigger handler, the bmg160 gyro driver does
one bus transfer for each axis. This has an impact on the frequency
of the accelerometer at high sample rates due to additional delays
introduced by the bus at each transfer.
Reading all axis values in one bus transfer reduces the delays
introduced by the bus.
Signed-off-by: Irina Tirdea <irina.tirdea@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Irina Tirdea [Thu, 24 Mar 2016 09:29:28 +0000 (11:29 +0200)]
iio: gyro: bmg160: use available_scan_masks
Use available_scan_masks to allow the iio core to select
the data to send to userspace depending on which axes are
enabled, instead of doing this in the driver's interrupt
handler.
Signed-off-by: Irina Tirdea <irina.tirdea@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Irina Tirdea [Thu, 24 Mar 2016 09:29:27 +0000 (11:29 +0200)]
iio: accel: bmc150: optimize transfers in trigger handler
Some i2c busses (e.g.: Synopsys DesignWare I2C adapter) need to
enable/disable the bus at each i2c transfer and must wait for
the enable/disable to happen before sending the data.
When reading data in the trigger handler, the bmc150 accel driver does
one bus transfer for each axis. This has an impact on the frequency
of the accelerometer at high sample rates due to additional delays
introduced by the bus at each transfer.
Reading all axis values in one bus transfer reduces the delays
introduced by the bus.
Signed-off-by: Irina Tirdea <irina.tirdea@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Irina Tirdea [Thu, 24 Mar 2016 09:29:26 +0000 (11:29 +0200)]
iio: accel: bmc150: use available_scan_masks
Use available_scan_masks to allow the iio core to select
the data to send to userspace depending on which axes are
enabled, instead of doing this in the driver's interrupt
handler.
Signed-off-by: Irina Tirdea <irina.tirdea@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Daeseok Youn [Thu, 31 Mar 2016 08:03:59 +0000 (17:03 +0900)]
staging: dgnc: clean up dgnc_input function
This is for fixing checkpatch.pl warning about
"Alignment should match open parenthesis" but if that is
fixed, code line is over 80 characters.
I think "ch->ch_rqueue + tail + i" could be declared once in
the begining of loop.
James Simmons [Thu, 31 Mar 2016 14:18:36 +0000 (10:18 -0400)]
staging: lustre: libcfs: move memory_pressure functions to libcfs_prim.h
Long ago libcfs_prim.h was used for userland code which is why
memory_pressure_*() handling is in both libcfs_prim.h and
linux-mem.h headers. So lets just move the memory_pressure_*()
to libcfs_prim.h.
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245
Reviewed-on: http://review.whamcloud.com/13841 Reviewed-by: frank zago <fzago@cray.com> Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Vitaly Fertman [Wed, 30 Mar 2016 23:49:06 +0000 (19:49 -0400)]
staging/lustre/ldlm: Solve a race for LRU lock cancel
This patch solves a race condition that the lock may be used again
after LRU cancellation policy check. In that case, the lock may have
locked or dirty pages that makes the policy check totally useless.
The problem is solved by checking l_last_used at cancellation time
therefore it can make sure that the lock has not been used.
Vitaly Fertman [Wed, 30 Mar 2016 23:49:04 +0000 (19:49 -0400)]
staging/lustre/ldlm: restore the ELC for enqueue
after LU-4300 enqueue does not ELC anymore, however if enqueue is
agressive (ls -la of a large dir) we may exceed lru-resize limit
quickly because LRUR shrinker and recalc are called not so often.
ELC is to be restored in enqueue.
ELC also should check for the lock weight, in addition to LRUR.
ELC can also keep "skipped" locks, i.e. once checked for the weight
and left in the lru - let LRUR take care about them later.
LRUR is to be left untouched, no weight logic, otherwise LU-5727
appears and OPEN locks do not get canceled.
Oleg Drokin [Wed, 30 Mar 2016 23:49:01 +0000 (19:49 -0400)]
staging/lustre/llite: Remove unused vui_local_lock field
vvp_io_setattr_lock is the only user that sets it, but it's
never checked anywhere, so could go away.
Also get rid of enum ccc_setattr_lock_type that becomes unused.
John Hammond [Wed, 30 Mar 2016 23:49:00 +0000 (19:49 -0400)]
staging/lustre/llite: Move several declarations to llite_internal.h
Move several declarations between llite_internal.h and vvp_internal.h
with the goal of reserving the latter header for functions that
pertain to vvp_{device,object,page,...}.
Signed-off-by: John L. Hammond <john.hammond@intel.com> Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-on: http://review.whamcloud.com/13714
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5971 Reviewed-by: Bobi Jam <bobijam@hotmail.com> Reviewed-by: James Simmons <uja.ornl@gmail.com> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
John Hammond [Wed, 30 Mar 2016 23:48:57 +0000 (19:48 -0400)]
staging/lustre/llite: rename struct ccc_thread_info to vvp_thread_info
struct ccc_thread_info is used in the VVP parts of llite so rename
it struct vvp_thread_info. Rename supporting functions accordingly.
Move init code from lcommon_cl.c to vvp_dev.c
Signed-off-by: John L. Hammond <john.hammond@intel.com> Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-on: http://review.whamcloud.com/13714
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5971 Reviewed-by: Bobi Jam <bobijam@hotmail.com> Reviewed-by: James Simmons <uja.ornl@gmail.com> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
John L. Hammond [Wed, 30 Mar 2016 23:48:51 +0000 (19:48 -0400)]
staging/lustre/llite: merge ccc_io and vvp_io
Move the contents of struct vvp_io into struct ccc_io, delete the
former, and rename the latter to struct vvp_io. Rename various ccc_io
related functions to use vvp rather than ccc.
Signed-off-by: John L. Hammond <john.hammond@intel.com>
Reviewed-on: http://review.whamcloud.com/13351
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5971 Reviewed-by: Lai Siyao <lai.siyao@intel.com> Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
John L. Hammond [Wed, 30 Mar 2016 23:48:50 +0000 (19:48 -0400)]
staging/lustre:llite: remove struct ll_ra_read
Ever since removal of the the unused function ll_ra_read_get(),
the struct ll_ra_read members lrr_reader and lrr_linkage and
the struct ll_readahead_state member ras_read_beads unnecessary
so remove them.
In struct vvp_io replace the struct ll_ra_read cui_bead member with
cui_ra_start and cui_ra_count.
Signed-off-by: John L. Hammond <john.hammond@intel.com>
Reviewed-on: http://review.whamcloud.com/13347
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5971 Reviewed-by: Bobi Jam <bobijam@hotmail.com> Reviewed-by: Lai Siyao <lai.siyao@intel.com> Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
John L. Hammond [Wed, 30 Mar 2016 23:48:45 +0000 (19:48 -0400)]
staging/lustre/llite: merge lclient.h into llite/vvp_internal.h
Move the definition of struct cl_client_cache to
lustre/include/cl_object.h and move the rest of
lustre/include/lclient.h in to lustre/llite/vvp_internal.h.
Signed-off-by: John L. Hammond <john.hammond@intel.com>
Reviewed-on: http://review.whamcloud.com/12592
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5971 Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com> Reviewed-by: James Simmons <uja.ornl@gmail.com> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Li Dongyang [Wed, 30 Mar 2016 23:48:44 +0000 (19:48 -0400)]
staging/lustre/llite: make sure we do cl_page_clip on the last page
When we are doing a partial IO on both first and last page,
the logic currently only call cl_page_clip on the first page, which
will end up with a incorrect i_size.
Signed-off-by: Li Dongyang <dongyang.li@anu.edu.au>
Reviewed-on: http://review.whamcloud.com/11630
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5552 Reviewed-by: Ian Costello <costello.ian@gmail.com> Reviewed-by: Niu Yawei <yawei.niu@intel.com> Reviewed-by: Li Xi <pkuelelixi@gmail.com> Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jinshan Xiong [Wed, 30 Mar 2016 23:48:40 +0000 (19:48 -0400)]
staging/lustre/clio: cl_lock simplification
In this patch, the cl_lock cache is eliminated. cl_lock is turned
into a cacheless data container for the requirements of locks to
complete the IO. cl_lock is created before I/O starts and destroyed
when the I/O is complete.
cl_lock depends on LDLM lock to fulfill lock semantics. LDLM lock
is attached to cl_lock at OSC layer. LDLM lock is still cacheable.
Two major methods are supported for cl_lock: clo_enqueue and
clo_cancel. A cl_lock is enqueued by cl_lock_request(), which will
call clo_enqueue() methods for each layer to enqueue the lock.
At the LOV layer, if a cl_lock consists of multiple sub cl_locks,
each sub locks will be enqueued correspondingly. At OSC layer, the
lock enqueue request will tend to reuse cached LDLM lock; otherwise
a new LDLM lock will have to be requested from OST side.
cl_lock_cancel() must be called to release a cl_lock after use.
clo_cancel() method will be called for each layer to release the
resource held by this lock. At OSC layer, the reference count of LDLM
lock, which is held at clo_enqueue time, is released.
LDLM lock can only be canceled if there is no cl_lock using it.
Signed-off-by: Bobi Jam <bobijam.xu@intel.com> Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-on: http://review.whamcloud.com/10858
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3259 Reviewed-by: John L. Hammond <john.hammond@intel.com> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Oleg Drokin [Wed, 30 Mar 2016 23:48:38 +0000 (19:48 -0400)]
staging/lustre: Remove struct ll_iattr
This was a compat code from the time it had ia_attr_flags.
Instead convert all the cryptic callers that did
((struct ll_iattr *)&op_data->op_attr)->ia_attr_flags into
direct access to op_data->op_attr_flags
This also makes lustre/include/linux/obd.h not needed anymore,
so remove it.
John L. Hammond [Wed, 30 Mar 2016 23:48:37 +0000 (19:48 -0400)]
staging/lustre/llite: remove some cl wrappers
In llite remove the wrapper functions and macros:
cl_i2info()
cl_i2sbi()
cl_iattr2fd()
cl_inode_info
cl_inode_mode()
cl_inode_{a,m,c}time()
cl_isize_{read,write,write_nolock}()
Signed-off-by: John L. Hammond <john.hammond@intel.com>
Reviewed-on: http://review.whamcloud.com/12850
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2675 Reviewed-by: James Simmons <uja.ornl@gmail.com> Reviewed-by: Lai Siyao <lai.siyao@intel.com> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
John L. Hammond [Wed, 30 Mar 2016 23:48:36 +0000 (19:48 -0400)]
staging/lustre/obd: remove struct client_obd_lock
Remove the definition of struct client_obd_lock and the functions
client_obd_list_{init,lock,unlock,done}(). Use spinlock_t for the
cl_{loi,lru}_list_lock members of struct client_obd and call
spin_{lock,unlock}() directly.
Signed-off-by: John L. Hammond <john.hammond@intel.com> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
In struct lmv_obd rename the init_mutex member to
lmv_init_mutex. Remove the compat macros lmv_init_{lock,unlock}() and
use mutex_{lock,unlock}(&lmv->lmv_init_mutex) instead.
Signed-off-by: John L. Hammond <john.hammond@intel.com>
Reviewed-on: http://review.whamcloud.com/12115
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2675 Reviewed-by: Bob Glossman <bob.glossman@intel.com> Reviewed-by: James Simmons <uja.ornl@gmail.com> Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
John L. Hammond [Wed, 30 Mar 2016 23:48:34 +0000 (19:48 -0400)]
staging/lustre/llite: remove lli_lvb
In struct ll_inode_info remove the struct ost_lvb lli_lvb member and
replace it with obd_time lli_{a,m,c}time. Rename ll_merge_lvb() to
ll_merge_attr(). Remove cl_merge_lvb() and replace calls to it with
calls to ll_merge_attr().
Signed-off-by: John L. Hammond <john.hammond@intel.com>
Reviewed-on: http://review.whamcloud.com/12849
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2675 Reviewed-by: Bobi Jam <bobijam@gmail.com> Reviewed-by: Lai Siyao <lai.siyao@intel.com> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jinshan Xiong [Wed, 30 Mar 2016 23:48:33 +0000 (19:48 -0400)]
staging/lustre/clio: optimize read ahead code
It used to check each page in the readahead window is covered by
a lock underneath, now cpo_page_is_under_lock() provides @max_index
to help decide the maximum ra window. @max_index can be modified by
OSC to extend the maximum lock region, to align stripe boundary at
LOV, and to make sure the readahead region at least covers read
region at LLITE layer.
After this is done, usually readahead code calls
cpo_page_is_under_lock() for each stripe.
Jinshan Xiong [Wed, 30 Mar 2016 23:48:31 +0000 (19:48 -0400)]
staging/lustre/osc: add weight function for DLM lock
Use weigh_ast to decide if a lock covers any pages.
In recovery, weigh_ast will be used to decide if a DLM read lock
covers any locked pages, or it will be canceled instead being
recovered.
The problem with the original implementation is that it attached
each osc_page to an osc_lock also changed lock state to add every
pages for readahead.
Jinshan Xiong [Wed, 30 Mar 2016 23:48:30 +0000 (19:48 -0400)]
staging/lustre/clio: add pages into writeback cache in batches
in ll_write_end(), instead of adding the page into writeback
cache directly, it will be held in a page list. After enough
pages have been collected, issue them all with cio_commit_async().
Jinshan Xiong [Wed, 30 Mar 2016 23:48:29 +0000 (19:48 -0400)]
staging/lustre/obdclass: Add a preallocated percpu cl_env
This change adds support for a single preallocated cl_env per CPU
which can be used in circumstances where reschedule is not possible.
Currently this interface is only used by the ll_releasepage function.
Jinshan Xiong [Wed, 30 Mar 2016 23:48:25 +0000 (19:48 -0400)]
staging/lustre: Reintroduce global env list
This reverts a patch that was merged before lustre client
was introduced into the stagign tree, so it's not in the history.
The performance dropped a lot when memory reclaim process kicked
in as ll_releasepage() was called to destroy lustre pages. It turned
out that big overhead to allocate cl_env and keys on the fly so we
have to revert this patch.
The original problem for the reverted patch would be solved in a
follow on patch instead.
Allocating a big hash table using the formula for osd
does not really work for clients. We will create new
hash table for each mount on a single client which is
a lot of memory more than expected.
This patch limits the hash table up to 8M which has
524288 entries
Signed-off-by: Li Dongyang <dongyang.li@anu.edu.au>
Reviewed-on: http://review.whamcloud.com/18048
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7689 Reviewed-by: Fan Yong <fan.yong@intel.com> Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Daeseok Youn [Tue, 29 Mar 2016 04:47:59 +0000 (13:47 +0900)]
staging: dgnc: remove parenthesis around the CONST |
remove parenthesis around the CONST | CONST.
It will be also fixed checkpatch.pl warning about
"Alignment should match open parenthesis" becasue
parenthesis were removed by this patch.
Daeseok Youn [Mon, 28 Mar 2016 04:54:15 +0000 (13:54 +0900)]
staging: dgnc: replace dgnc_offset_table with bit shift.
the dgnc_offset_table has a same value with (1 << port).
So I tried to replace dgnc_offset_table array with 1 << port.
And also there are redundant assignments(tmp and current_port)
inside while loop for checking uart port, and remove them.
staging: comedi: drivers: fix possible bug in comedi_handle_events()
This function assumes that the async subdevice has a cancel() function.
It looks like all the current comedi drivers implement a cancel() for
the async subdevices except for the dt2814 analog input usbdevice.
Fix comedi_handle_events() so it does not try to call a non-existent
cancel() function.
Add a dev_warn() to __comedi_device_postconfig_async() so that any new
driver authors will be reminded to implement the cancel().
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>