[PATCH 01/15] workqueue: reorder queueing functions so that _on() variants are on top

2012-07-27 Thread Tejun Heo
Currently, queue/schedule[_delayed]_work_on() are located below the counterpart without the _on postifx even though the latter is usually implemented using the former. Swap them. This is cleanup and doesn't cause any functional difference. Signed-off-by: Tejun Heo ---

[PATCH 05/15] workqueue: set delayed_work->timer function on initialization

2012-07-27 Thread Tejun Heo
delayed_work->timer.function is currently initialized during queue_delayed_work_on(). Export delayed_work_timer_fn() and set delayed_work timer function during delayed_work initialization together with other fields. This ensures the timer function is always valid on an initialized delayed_work.

[PATCH 11/15] workqueue: reorganize try_to_grab_pending() and __cancel_timer_work()

2012-07-27 Thread Tejun Heo
* Move timer handling from __cancel_work_timer() to try_to_grab_pending(). * Make try_to_grab_pending() use -EAGAIN instead of -1 for busy-looping and drop the ret local variable. * Add proper function comment to try_to_grab_pending(). This makes the code a bit easier to understand and will

[PATCH 13/15] workqueue: implement mod_delayed_work[_on]()

2012-07-27 Thread Tejun Heo
Workqueue was lacking a mechanism to modify the timeout of an already pending delayed_work. delayed_work users have been working around this using several methods - using an explicit timer + work item, messing directly with delayed_work->timer, and canceling before re-queueing, all of which are

[PATCH 14/15] workqueue: use mod_delayed_work() instead of cancel + queue

2012-07-27 Thread Tejun Heo
Convert delayed_work users doing [__]cancel_delayed_work() + queue_delayed_work() to mod_delayed_work(). Most conversions are straight-forward. Ones worth mentioning are, * drivers/edac/edac_mc.c: edac_mc_workq_setup() converted to always use mod_delayed_work() and cancel loop in

[PATCH 15/15] workqueue: deprecate __cancel_delayed_work()

2012-07-27 Thread Tejun Heo
__cancel_delayed_work() is different from cancel_delayed_work() in that it uses del_timer() instead of del_timer_sync(). This adds confusion to already complicated flush / cancel API and given that the only thing delayed_work->timer does is queueing the work, the difference between

[PATCH 12/15] workqueue: mark a work item being canceled as such

2012-07-27 Thread Tejun Heo
There can be two reasons try_to_grab_pending() can fail with -EAGAIN. One is when someone else is queueing or deqeueing the work item. With the previous patches, it is guaranteed that PENDING and queued state will soon agree making it safe to busy-retry in this case. The other is if multiple

[PATCH 10/15] workqueue: factor out __queue_delayed_work() from queue_delayed_work_on()

2012-07-27 Thread Tejun Heo
This is to prepare for mod_delayed_work[_on]() and doesn't cause any functional difference. Signed-off-by: Tejun Heo --- kernel/workqueue.c | 74 --- 1 files changed, 41 insertions(+), 33 deletions(-) diff --git a/kernel/workqueue.c

[PATCH 09/15] workqueue: introduce WORK_OFFQ_FLAG_*

2012-07-27 Thread Tejun Heo
Low WORK_STRUCT_FLAG_BITS bits of work_struct->data contain WORK_STRUCT_FLAG_* and flush color. If the work item is queued, the rest point to the cpu_workqueue with WORK_STRUCT_CWQ set; otherwise, WORK_STRUCT_CWQ is clear and the bits contain the last CPU number - either a real CPU number or one

[PATCH 08/15] workqueue: move try_to_grab_pending() upwards

2012-07-27 Thread Tejun Heo
try_to_grab_pending() will be used by to-be-implemented mod_delayed_work[_on](). Move try_to_grab_pending() and related functions above queueing functions. This patch only moves functions around. Signed-off-by: Tejun Heo --- kernel/workqueue.c | 286

[PATCH 04/15] workqueue: disable preemption while manipulating PENDING

2012-07-27 Thread Tejun Heo
Queueing operations use WORK_STRUCT_PENDING_BIT to synchronize access to the target work item. They first try to claim the bit and proceed with queueing only after that succeeds and there's a window between PENDING being set and the actual queueing where the task can be preempted. There's also a

[PATCH 03/15] workqueue: add missing smp_wmb() in process_one_work()

2012-07-27 Thread Tejun Heo
WORK_STRUCT_PENDING is used to claim ownership of a work item and process_one_work() releases it before starting execution. When someone else grabs PENDING, all pre-release updates to the work item should be visible and all updates made by the new owner should happen afterwards. Grabbing PENDING

[PATCH 07/15] workqueue: fix zero @delay handling of queue_delayed_work_on()

2012-07-27 Thread Tejun Heo
If @delay is zero and the dealyed_work is idle, queue_delayed_work() queues it for immediate execution; however, queue_delayed_work_on() lacks this logic and always goes through timer regardless of @delay. This patch moves 0 @delay handling logic from queue_delayed_work() to

[PATCH 06/15] workqueue: unify local CPU queueing handling

2012-07-27 Thread Tejun Heo
Queueing functions have been using different methods to determine the local CPU. * queue_work() superflously uses get/put_cpu() to acquire and hold the local CPU across queue_work_on(). * delayed_work_timer_fn() uses smp_processor_id(). * queue_delayed_work() calls queue_delayed_work_on()

[PATCH 02/15] workqueue: make queueing functions return bool

2012-07-27 Thread Tejun Heo
All queueing functions return 1 on success, 0 if the work item was already pending. Update them to return bool instead. This signifies better that they don't return 0 / -errno. This is cleanup and doesn't cause any functional difference. While at it, fix comment opening for schedule_work_on().

[PATCHSET wq/for-3.7] workqueue: implement mod_delayed_work[_on]()

2012-07-27 Thread Tejun Heo
delayed_work has been annoyingly missing the mechanism to modify timer of a pending delayed_work - ie. mod_timer() counterpart. delayed_work users have been working around this using several methods - using an explicit timer + work item, messing directly with delayed_work->timer, and canceling

[RFC ebeam PATCH 0/3] new USB eBeam input driver

2012-07-27 Thread Yann Cantin
Hi, This patchset is a test-drive for a new USB input driver for eBeam devices. Currently, only the Luidia eBeam classic projection model is supported (usb id known). Patch 1 and 2 are here to let the ebeam driver be choose to handle the device instead of the generic-usb hid one (totally

[RFC ebeam PATCH 1/3] hid: hid-ids.h: Add vendor and device ID for eBeam classic device.

2012-07-27 Thread Yann Cantin
Signed-off-by: Yann Cantin --- drivers/hid/hid-ids.h |3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index 41c34f2..8cd4b8e 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -271,6 +271,9 @@ #define

[RFC ebeam PATCH 3/3] input: misc: New USB eBeam input driver.

2012-07-27 Thread Yann Cantin
Signed-off-by: Yann Cantin --- drivers/input/misc/Kconfig | 21 + drivers/input/misc/Makefile |1 + drivers/input/misc/ebeam.c | 895 +++ 3 files changed, 917 insertions(+) create mode 100644 drivers/input/misc/ebeam.c diff --git

[RFC ebeam PATCH 2/3] hid: hid-core.c: Blackist eBeam classic device.

2012-07-27 Thread Yann Cantin
Signed-off-by: Yann Cantin --- drivers/hid/hid-core.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 500844f..1c03586 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -1908,6 +1908,9 @@ static const struct

Re: [PATCH] sh: pfc: Fix build issues in pinctrl.c

2012-07-27 Thread Paul Mundt
On Sat, Jul 28, 2012 at 12:07:04AM +0200, Rafael J. Wysocki wrote: > > First off, drivers/sh/pfc/pinctrl.c doesn't build after commit > 5d589b0 (pinctrl: remove pinctrl_remove_gpio_range), because > sh_pfc_pinctrl_remove() uses the function that has been removed by > that commit. Fix this by

Re: [PATCH 5/6] rbtree: faster augmented erase

2012-07-27 Thread Michel Lespinasse
On Fri, Jul 27, 2012 at 1:02 PM, Peter Zijlstra wrote: >On Fri, 2012-07-20 at 05:31 -0700, Michel Lespinasse wrote: >> --- a/lib/rbtree_test.c >> +++ b/lib/rbtree_test.c >> @@ -1,5 +1,6 @@ >> #include >> #include >> +#include >This confuses me.. either its internal to the rb-tree

Re: [GIT PULL] New TPM driver, hwrng driver and fixes

2012-07-27 Thread Kent Yoder
>> + /* err can be positive if it came from the TPM itself, >> + * so return a negative value here instead. */ >> + err = -EFAULT; > > -EFAULT is definitely wrong (that means a bad pointer was passed), you > can use -EIO instead. > >

Re: [Regression, post-3.5] System suspend broken on the Mackerel board

2012-07-27 Thread Paul Mundt
On Sat, Jul 28, 2012 at 12:53:11AM +0200, Rafael J. Wysocki wrote: > Hi Paul, > > Unfortunately, your commit > > commit ca5481c68e9fbcea62bb3c78ae6cccf99ca8fb73 > Author: Paul Mundt > Date: Tue Jul 10 12:08:14 2012 +0900 > > sh: pfc: Rudimentary pinctrl-backed GPIO support. > > breaks

Re: [PATCH 14/15] workqueue: use mod_delayed_work() instead of cancel + queue

2012-07-27 Thread Henrique de Moraes Holschuh
On Fri, 27 Jul 2012, Tejun Heo wrote: > Convert delayed_work users doing [__]cancel_delayed_work() + > queue_delayed_work() to mod_delayed_work(). > > Most conversions are straight-forward. Ones worth mentioning are, > > * drivers/edac/edac_mc.c: edac_mc_workq_setup() converted to always >

Re: [RFC v2] ARM: sched_clock: update epoch_cyc on resume

2012-07-27 Thread Colin Cross
On Fri, Jul 27, 2012 at 4:38 PM, Russell King - ARM Linux wrote: > On Sat, Jul 28, 2012 at 01:32:50AM +0200, Linus Walleij wrote: >> On Wed, Jul 25, 2012 at 4:49 AM, Colin Cross wrote: >> >> > Many clocks that are used to provide sched_clock will reset during >> > suspend. If read_sched_clock

Re: [PATCH 14/15] workqueue: use mod_delayed_work() instead of cancel + queue

2012-07-27 Thread Dmitry Torokhov
On Fri, Jul 27, 2012 at 04:55:07PM -0700, Tejun Heo wrote: > Convert delayed_work users doing [__]cancel_delayed_work() + > queue_delayed_work() to mod_delayed_work(). > > Most conversions are straight-forward. Ones worth mentioning are, > > * drivers/edac/edac_mc.c: edac_mc_workq_setup()

Re: [PATCH 0/7] KDB: Kiosk (reduced capabilities) mode

2012-07-27 Thread Anton Vorontsov
On Fri, Jul 27, 2012 at 12:30:49PM -0700, Colin Cross wrote: > > The are two use-cases for the mode, one is evil, but another is quite > > legitimate. > > > > The evil use case is used by some (ahem) phone manufaturers that want > > to have a debuging facilities on a production device, but still

Re: [ANNOUNCE] util-linux v2.22-rc1

2012-07-27 Thread Tom Gundersen
On Fri, Jul 27, 2012 at 9:37 AM, Karel Zak wrote: > > The util-linux release v2.22-rc1 is available at > >ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.22/ > > Feedback and bug reports, as always, are welcomed. I'm still getting an empty /usr/share/man/ru/man1/, don't know if I'm doing

Re: [RFC ebeam PATCH 3/3] input: misc: New USB eBeam input driver.

2012-07-27 Thread Dmitry Torokhov
Hi Yann, On Sat, Jul 28, 2012 at 02:02:34AM +0200, Yann Cantin wrote: > > Signed-off-by: Yann Cantin > --- > drivers/input/misc/Kconfig | 21 + > drivers/input/misc/Makefile |1 + > drivers/input/misc/ebeam.c | 895 > +++ > 3 files changed, 917

Re: [PATCH 0/7] KDB: Kiosk (reduced capabilities) mode

2012-07-27 Thread John Stultz
On 07/27/2012 06:26 PM, Anton Vorontsov wrote: On Fri, Jul 27, 2012 at 12:30:49PM -0700, Colin Cross wrote: The are two use-cases for the mode, one is evil, but another is quite legitimate. The evil use case is used by some (ahem) phone manufaturers that want to have a debuging facilities on a

Re: [PATCH 0/7] KDB: Kiosk (reduced capabilities) mode

2012-07-27 Thread Colin Cross
On Fri, Jul 27, 2012 at 6:26 PM, Anton Vorontsov wrote: > But if you say that it wasn't the case, and no one thought about the > reducing the debugger in the "evil" way, so be it, I trust you. But I > still don't trust the phone vendors. They showed their bad attitude > in many ways towards

[PATCH] xtensa: select generic atomic64_t support

2012-07-27 Thread Fengguang Wu
This will fix build errors: block/blk-cgroup.c:609:2: error: unknown type name 'atomic64_t' block/blk-cgroup.c:609:2: error: implicit declaration of function 'ATOMIC64_INIT' [-Werror=implicit-function-declaration] Signed-off-by: Fengguang Wu --- arch/xtensa/Kconfig |1 + 1 file changed, 1

[PATCH V4 0/3] Improve virtio-blk performance

2012-07-27 Thread Asias He
Hi, Jens & Rusty This version is rebased against linux-next which resolves the conflict with Paolo Bonzini's 'virtio-blk: allow toggling host cache between writeback and writethrough' patch. Patch 1/3 and 2/3 applies on linus's master as well. Since Rusty will pick up patch 3/3 so the changes to

[PATCH V4 1/3] block: Introduce __blk_segment_map_sg() helper

2012-07-27 Thread Asias He
Split the mapping code in blk_rq_map_sg() to a helper __blk_segment_map_sg(), so that other mapping function, e.g. blk_bio_map_sg(), can share the code. Cc: Jens Axboe Cc: Tejun Heo Cc: Shaohua Li Cc: Rusty Russell Cc: linux-kernel@vger.kernel.org Suggested-by: Tejun Heo Suggested-by: Jens

[PATCH V4 3/3] virtio-blk: Add bio-based IO path for virtio-blk

2012-07-27 Thread Asias He
This patch introduces bio-based IO path for virtio-blk. Compared to request-based IO path, bio-based IO path uses driver provided ->make_request_fn() method to bypasses the IO scheduler. It handles the bio to device directly without allocating a request in block layer. This reduces the IO path in

[PATCH V4 2/3] block: Add blk_bio_map_sg() helper

2012-07-27 Thread Asias He
Add a helper to map a bio to a scatterlist, modelled after blk_rq_map_sg. This helper is useful for any driver that wants to create a scatterlist from its ->make_request_fn method. Changes in v2: - Use __blk_segment_map_sg to avoid duplicated code - Add cocbook style function comment Cc: Jens

Re: [PATCH 5/6] rbtree: faster augmented erase

2012-07-27 Thread Michel Lespinasse
On Fri, Jul 27, 2012 at 5:44 PM, Michel Lespinasse wrote: > On Fri, Jul 27, 2012 at 1:02 PM, Peter Zijlstra wrote: >> As it stands rb_erase() isn't inlined and its rather big, >> why would you want to inline it for augmented callers? > > Just as the non-augmented rb_erase() is generated (as a

Re: [PATCH V3 3/3] virtio-blk: Add bio-based IO path for virtio-blk

2012-07-27 Thread Asias He
On 07/27/2012 08:33 AM, Rusty Russell wrote: On Fri, 13 Jul 2012 16:38:51 +0800, Asias He wrote: Add 'virtio_blk.use_bio=1' to kernel cmdline or 'modprobe virtio_blk use_bio=1' to enable ->make_request_fn() based I/O path. This patch conflicts with Paolo's Bonzini's 'virtio-blk: allow

Re: [PATCH] random: mix in architectural randomness in extract_buf()

2012-07-27 Thread Theodore Ts'o
Ok, I'll add this patch to the random tree. I've modified the commit message a bit since the speed advertisement of RDRAND is rather pointless --- processes aren't generating session keys or long term keys at a high rate, and programs can't count on /dev/random being super fast and having

Re: [PATCH] random: mix in architectural randomness in extract_buf()

2012-07-27 Thread H. Peter Anvin
On 07/27/2012 07:39 PM, Theodore Ts'o wrote: Ok, I'll add this patch to the random tree. I've modified the commit message a bit since the speed advertisement of RDRAND is rather pointless --- processes aren't generating session keys or long term keys at a high rate, and programs can't count on

more interrupts (lower performance) in bare-metal compared with running VM

2012-07-27 Thread sheng qiu
Hi all, i am comparing network throughput performance under bare-metal case with that running VM with assigned-device (assigned NIC). i have two physical machines (each has a 10Gbit NIC), one is used as remote server (run netserver) and the other is used as the target tested one (run netperf with

[GIT PULL] ext4 updates for 3.6

2012-07-27 Thread Theodore Ts'o
The following changes since commit 6887a4131da3adaab011613776d865f4bcfb5678: Linux 3.5-rc5 (2012-06-30 16:08:57 -0700) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git tags/ext4_for_linus for you to fetch changes up to

Re: [RFC v2] ARM: sched_clock: update epoch_cyc on resume

2012-07-27 Thread Colin Cross
On Fri, Jul 27, 2012 at 6:15 PM, Colin Cross wrote: > On Fri, Jul 27, 2012 at 4:38 PM, Russell King - ARM Linux > wrote: >> On Sat, Jul 28, 2012 at 01:32:50AM +0200, Linus Walleij wrote: >>> On Wed, Jul 25, 2012 at 4:49 AM, Colin Cross wrote: >>> >>> > Many clocks that are used to provide

Re: more interrupts (lower performance) in bare-metal compared with running VM

2012-07-27 Thread Alex Williamson
On Fri, 2012-07-27 at 22:09 -0500, sheng qiu wrote: > Hi all, > > i am comparing network throughput performance under bare-metal case > with that running VM with assigned-device (assigned NIC). i have two > physical machines (each has a 10Gbit NIC), one is used as remote > server (run netserver)

[PATCH -mm] fault-injection: fix failcmd.sh warning

2012-07-27 Thread Akinobu Mita
fault-injection-add-tool-to-run-command-with-failslab-or-fail_page_alloc.patch in -mm tree adds tools/testing/fault-injection/failcmd.sh to make it easier to inject slab/page allocation failures by fault injection. failcmd.sh prints the following warning when running with arguments for command.

[PATCH 1/5] [RFC] Add volatile range management code

2012-07-27 Thread John Stultz
This patch provides the volatile range management code that filesystems can utilize when implementing FALLOC_FL_MARK_VOLATILE. It tracks a collection of page ranges against a mapping stored in an interval-tree. This code handles coalescing overlapping and adjacent ranges, as well as splitting

[PATCH 4/5] [RFC][HACK] Add LRU_VOLATILE support to the VM

2012-07-27 Thread John Stultz
In an attempt to push the volatile range managment even deeper into the VM code, this is my first attempt at implementing Minchan's idea of a LRU_VOLATILE list in the mm core. This list sits along side the LRU_ACTIVE_ANON, _INACTIVE_ANON, _ACTIVE_FILE, _INACTIVE_FILE and _UNEVICTABLE lru lists.

[PATCH 5/5] [RFC][HACK] Switch volatile/shmem over to LRU_VOLATILE

2012-07-27 Thread John Stultz
This changes the earlier shrinker based volatile range management over to using the LRU_VOLATILE list in mm core. Again, this is likely has performance issues, as well as other problems I'm not aware of, so I'd greatly appreciate any additional feedback or suggestions. CC: Andrew Morton CC:

[PATCH 3/5] [RFC] ashmem: Convert ashmem to use volatile ranges

2012-07-27 Thread John Stultz
Rework of my first pass attempt at getting ashmem to utilize the volatile range code, now using the fallocate interface. In this implementaiton GET_PIN_STATUS is unimplemented, due to the fact that adding a ISVOLATILE check wasn't considered terribly useful in earlier reviews. It would be trivial

[PATCH 2/5] [RFC] tmpfs: Add FALLOC_FL_MARK_VOLATILE/UNMARK_VOLATILE handlers

2012-07-27 Thread John Stultz
This patch enables FALLOC_FL_MARK_VOLATILE/UNMARK_VOLATILE functionality for tmpfs making use of the volatile range management code. Conceptually, FALLOC_FL_MARK_VOLATILE is like a delayed FALLOC_FL_PUNCH_HOLE. This allows applications that have data caches that can be re-created to tell the

[PATCH 0/5][RFC] Fallocate Volatile Ranges v6

2012-07-27 Thread John Stultz
So after not getting too much positive feedback on my last attempt at trying to use a non-shrinker method for managing & purging volatile ranges, I decided I'd go ahead and try to implement something along Minchan's ERECLAIM LRU list idea. Again this patchset has two parts: The first 3 patches

Re: [PATCH 0/4] ideapad: patches for v3.6 merge window

2012-07-27 Thread Matthew Garrett
This tree also seems to have ARM stuff in it? -- Matthew Garrett | mj...@srcf.ucam.org -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read

Re: more interrupts (lower performance) in bare-metal compared with running VM

2012-07-27 Thread Eric Dumazet
On Fri, 2012-07-27 at 22:09 -0500, sheng qiu wrote: > Hi all, > > i am comparing network throughput performance under bare-metal case > with that running VM with assigned-device (assigned NIC). i have two > physical machines (each has a 10Gbit NIC), one is used as remote > server (run netserver)

Re: RAID extremely slow

2012-07-27 Thread Grant Coady
On Fri, 27 Jul 2012 14:45:18 -0700, you wrote: >On 07/27/2012 12:08 PM, Bill Davidsen wrote: >> Have you set the io scheduler to deadline on all members of the array? >> That's kind of "job one" on older kernels. >> > >I have not, thanks for the tip, I'll look into that now. Plus I disable the

Re: [PATCH] nfs-util: Add cache_flush in mountd UMNT procedure.

2012-07-27 Thread Namjae Jeon
>> Hi James. >> I have a question. >> If we found the method to notify nfs when unplugging device, > Hi James. > What's that? I need to check more... > >> Can nfsd >> flush only entry of usb mount ? > > Hm, I don't think there's anything that does that now. But I think if > you look it up and

Re: [ 39/40] cpuset: mm: reduce large amounts of memory barrier related damage v3

2012-07-27 Thread Herton Ronaldo Krzesinski
On Fri, Jul 27, 2012 at 12:01:16PM -0700, Greg Kroah-Hartman wrote: > On Fri, Jul 27, 2012 at 04:23:47PM +0100, Mel Gorman wrote: > > > > --- a/mm/slub.c > > > > +++ b/mm/slub.c > > > > @@ -1457,6 +1457,7 @@ static struct page *get_any_partial(stru > > > > struct zone *zone; > > > >

Re: [PATCH v2] platform: Add support for automatic device IDs

2012-07-27 Thread Jean Delvare
On Fri, 27 Jul 2012 22:14:59 +0200, Jean Delvare wrote: > Code not tested yet, my test machine is currently used for a different > task that cannot be interrupted. Tested now, works fine. -- Jean Delvare -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a

<    5   6   7   8   9   10