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
---
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.
* 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
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
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
__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
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
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
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
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
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
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
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
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()
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().
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
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
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
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
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
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
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
>> + /* 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.
>
>
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
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
>
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
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()
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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)
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.
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
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.
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:
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
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
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
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
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)
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
>> 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
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;
> > > >
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
901 - 958 of 958 matches
Mail list logo