Re: linux-next: build failure after merge of the cgroup tree

2012-09-14 Thread Daniel Wagner
Hi Stephen, On 14.09.2012 05:17, Stephen Rothwell wrote: Hi Tejun, After merging the cgroup tree, today's linux-next build (powerpc ppc64_defconfig) failed like this: drivers/net/tun.c: In function 'tun_alloc_skb': drivers/net/tun.c:589:2: error: implicit declaration of function 'sock_update_

[PATCH] Fix for "cgroup: Assign subsystem IDs during compile time"

2012-09-14 Thread Daniel Wagner
From: Daniel Wagner Hi, Sorry for breaking Tejun's cgroup for-3.7 branch. Here are two patches which fix this problem. Either of them will do. cheers, daniel Cc: "David S. Miller" Cc: "Michael S. Tsirkin" Cc: Gao feng Cc: Jamal Hadi Salim Cc: Joe Perches C

[PATCH v6] cgroup: net_cls: Move sock_update_classid() declaration to cls_cgroup.h

2012-09-14 Thread Daniel Wagner
From: Daniel Wagner The two users of sock_update_classid() are net/socket.c and drivers/net/tun.c. socket.c includes cls_cgroup.h already. Update tun.c to inlcude the header. Signed-off-by: Daniel Wagner Acked-by: Tejun Heo Acked-by: Li Zefan Cc: Gao feng Cc: Jamal Hadi Salim Cc: John

[PATCH] cgroup: net_cls: Include missing header with sock_update_classid() definition

2012-09-14 Thread Daniel Wagner
From: Daniel Wagner commit 1f66c0a8833c3974ab6b35edcf4f8585b2f94592 Author: Daniel Wagner Date: Wed Sep 12 16:12:01 2012 +0200 cgroup: net_cls: Move sock_update_classid() declaration to cls_cgroup.h Claimed that there was only net/socket.c depending on sock_update_class(). That is not

Re: [PATCH] cgroup: net_cls: Include missing header with sock_update_classid() definition

2012-09-14 Thread Daniel Wagner
Hi Sedat, On 14.09.2012 16:43, Sedat Dilek wrote: On Fri, Sep 14, 2012 at 4:33 PM, Daniel Wagner wrote: From: Daniel Wagner commit 1f66c0a8833c3974ab6b35edcf4f8585b2f94592 Author: Daniel Wagner Date: Wed Sep 12 16:12:01 2012 +0200 cgroup: net_cls: Move sock_update_classid

Re: [PATCH 1/9 v3] cgroup: add cgroup_subsys->post_create()

2012-11-12 Thread Daniel Wagner
Hi Tejun, On 09.11.2012 18:22, Tejun Heo wrote: Hey, Daniel. On Fri, Nov 09, 2012 at 12:09:38PM +0100, Daniel Wagner wrote: On 08.11.2012 20:07, Tejun Heo wrote:> Subject: cgroup: add cgroup_subsys->post_create() Currently, there's no way for a controller to find out whether a

Re: [PATCH 1/9 v3] cgroup: add cgroup_subsys->post_create()

2012-11-09 Thread Daniel Wagner
} part before create() or add some protection between create() and post_create() callback in net_prio. I have a patch but I see I could drop it completely if post_create() is there. cheers, daniel From 84fbbdf0dc5d3460389e39a00a3ee553ee55b563 Mon Sep 17 00:00:00 2001 From: Daniel Wagner

Re: [PATCH 2/3] netcls_cgroup: introduce cgroup_cls_state->is_local

2012-11-19 Thread Daniel Wagner
Hi Tejun, On 17.11.2012 04:31, Tejun Heo wrote: -static int write_classid(struct cgroup *cgrp, struct cftype *cft, u64 value) +static int write_classid(struct cgroup *cgrp, struct cftype *cft, +const char *buf) { + struct cgroup_cls_state *cs = cgrp_cls_state(cgrp

Re: [PATCH 3/3] netcls_cgroup: implement proper hierarchy support

2012-11-19 Thread Daniel Wagner
Hi Tejun, On 17.11.2012 04:31, Tejun Heo wrote: @@ -112,15 +161,6 @@ struct cgroup_subsys net_cls_subsys = { .subsys_id = net_cls_subsys_id, .base_cftypes = ss_files, .module = THIS_MODULE, - - /* -* While net_cls cgroup has the rudimentary hi

Re: [PATCH 1/3] netcls_cgroup: introduce netcls_mutex

2012-11-19 Thread Daniel Wagner
ds, this currently doesn't make any userland-visible difference, but will help implementing proper hierarchy support. Signed-off-by: Tejun Heo Acked-by: Daniel Wagner -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord.

Re: [PATCHSET cgroup/for-3.8] netcls_cgroup: implement hierarchy support

2012-11-19 Thread Daniel Wagner
Hi Tejun, On 17.11.2012 04:30, Tejun Heo wrote: > Hello, guys. > > This patchset implements proper hierarchy support for netcls_cgroup. > Pretty simliar to the netprio one[3]. Simpler as each cgroup has > single config value instead of array of them. > > This patchset contains the following thr

Re: [PATCH 3/3] netcls_cgroup: implement proper hierarchy support

2012-11-19 Thread Daniel Wagner
Hi Tejun, On 19.11.2012 18:08, Tejun Heo wrote: > Hello, Daniel. > > On Mon, Nov 19, 2012 at 02:47:06PM +0100, Daniel Wagner wrote: >> On 17.11.2012 04:31, Tejun Heo wrote: >>> @@ -112,15 +161,6 @@ struct cgroup_subsys net_cls_subsys = { >>> .s

Re: [PATCH v2 2/3] netcls_cgroup: introduce cgroup_cls_state->is_local

2012-11-19 Thread Daniel Wagner
2: Daniel pointed out that cftype->write_u64() accepts base prefix (e.g. 0x10 for 16). Updated "%lld" to "%lli". Signed-off-by: Tejun Heo Acked-by: David S. Miller Acked-by: Neil Horman Cc: Daniel Wagner Acked-by: Daniel Wagner thanks, daniel -- To unsubscribe fro

Re: [PATCHSET cgroup/for-3.8] netprio_cgroup: implement hierarchy support

2012-11-19 Thread Daniel Wagner
Hi Tejun, I have tested this series and it works nicely. I didn't mentioned yet to review it completely. I will do it tomorrow. cheers, daniel -- 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

Re: [PATCHSET cgroup/for-3.8] netprio_cgroup: implement hierarchy support

2012-11-19 Thread Daniel Wagner
On 19.11.2012 20:25, Daniel Wagner wrote: Hi Tejun, I have tested this series and it works nicely. I didn't mentioned yet to review it completely. I will do it tomorrow. s/mentioned/managed/ -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body

Re: [PATCH 1/7] netcls_cgroup: move config inheritance to ->css_online() and remove .broken_hierarchy marking

2012-11-20 Thread Daniel Wagner
Not introducing the 'is_local' is a good thing. Tested and Acked-by: Daniel Wagner -- 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/majordo

Re: [PATCH 2/7] netprio_cgroup: simplify write_priomap()

2012-11-20 Thread Daniel Wagner
On 20.11.2012 09:30, Tejun Heo wrote: sscanf() doesn't bite. Signed-off-by: Tejun Heo Acked-by: Neil Horman Tested and Acked-by: Daniel Wagner -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org

Re: [PATCH 3/7] netprio_cgroup: shorten variable names in extend_netdev_table()

2012-11-20 Thread Daniel Wagner
On 20.11.2012 09:30, Tejun Heo wrote: The function is about to go through a rewrite. In preparation, shorten the variable names so that we don't repeat "priomap" so often. This patch is cosmetic. Signed-off-by: Tejun Heo Acked-by: Neil Horman Tested and Acked-by: Daniel

Re: [PATCH 4/7] netprio_cgroup: reimplement priomap expansion

2012-11-20 Thread Daniel Wagner
Hi Tejun, On 20.11.2012 09:30, Tejun Heo wrote: > netprio kept track of the highest prioidx allocated and resized > priomaps accordingly when necessary. This makes it necessary to keep > track of prioidx allocation and may end up resizing on every new > prioidx. > > Update extend_netdev_table()

Re: [PATCH 5/7] netprio_cgroup: use cgroup->id instead of cgroup_netprio_state->prioidx

2012-11-20 Thread Daniel Wagner
ed above @cs allocation to simplify error path. * In cgrp_css_free(), @cs assignment is made initialization. Signed-off-by: Tejun Heo Acked-by: Neil Horman Tested and Acked-by: Daniel Wagner -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body

Re: [PATCH 6/7] netprio_cgroup: implement netprio[_set]_prio() helpers

2012-11-20 Thread Daniel Wagner
On 20.11.2012 09:30, Tejun Heo wrote: Introduce two helpers - netprio_prio() and netprio_set_prio() - which hide the details of priomap access and expansion. This will help implementing hierarchy support. Signed-off-by: Tejun Heo Acked-by: Neil Horman Tested and Acked-by: Daniel Wagner

Re: [PATCH 7/7] netprio_cgroup: allow nesting and inherit config on cgroup creation

2012-11-20 Thread Daniel Wagner
s allowed and the first level cgroups below the root cgroup behave differently - they inherit priorities from the root cgroup on creation instead of starting with 0. This is unfortunate but not doing so is much crazier. Signed-off-by: Tejun Heo Tested and Acked-by: Daniel Wagner --- Document

Re: [PATCH 4/7] netprio_cgroup: reimplement priomap expansion

2012-11-20 Thread Daniel Wagner
On 20.11.2012 15:38, Tejun Heo wrote: Hello, Daniel. On Tue, Nov 20, 2012 at 09:46:22AM +0100, Daniel Wagner wrote: struct netprio_map { struct rcu_head rcu; struct netprio_aux *aux;/* auxiliary config array */ u32 priomap_len; u32 priomap[]; }; Is

Re: [PATCH 7/7] netprio_cgroup: allow nesting and inherit config on cgroup creation

2012-11-20 Thread Daniel Wagner
Hi Tejun, On 20.11.2012 15:40, Tejun Heo wrote: Hello, Daniel. On Tue, Nov 20, 2012 at 09:57:14AM +0100, Daniel Wagner wrote: -static void cgrp_css_free(struct cgroup *cgrp) +static int cgrp_css_online(struct cgroup *cgrp) { - struct cgroup_netprio_state *cs = cgrp_netprio_state(cgrp

Re: [PATCH 4/7] netprio_cgroup: reimplement priomap expansion

2012-11-20 Thread Daniel Wagner
On 20.11.2012 16:13, Tejun Heo wrote: Hello, On Tue, Nov 20, 2012 at 04:09:22PM +0100, Daniel Wagner wrote: Thanks for the explanation. I was pondering if the new size in power of two could be a bit too excessive and the allocation step could be linear, e.g. stick at 4096. target_id will

ALSA regression Macbook Air 5,2: No sound from the loudspeaker

2013-03-25 Thread Daniel Wagner
Hi, I experience a regression on my Macbook Air 2012 model with the 3.9-rc kernels (v3.9-rc2-284-gaea8b5d) The symptoms are that there is just no sound from the loudspeakers. The headphone output works fine. I was able to pin point it down to one commit 1077a024 "ALSA: hda - Use generic pars

Re: [alsa-devel] ALSA regression Macbook Air 5, 2: No sound from the loudspeaker

2013-03-26 Thread Daniel Wagner
On 03/25/2013 07:46 PM, Daniel Wagner wrote: I experience a regression on my Macbook Air 2012 model with the 3.9-rc kernels (v3.9-rc2-284-gaea8b5d) The symptoms are that there is just no sound from the loudspeakers. The headphone output works fine. Oh, there is already a fix in the mainline

Re: [PATCH 12/23] cgroup: pass around cgroup_subsys_state instead of cgroup in file methods

2013-08-05 Thread Daniel Wagner
_cls: cgrp_cls_state() doesn't have any user left. Removed. Signed-off-by: Tejun Heo Cc: Li Zefan Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Johannes Weiner Cc: Michal Hocko Cc: Balbir Singh Cc: Aristeu Rozanski Cc: Matt Helsley Cc: Daniel Wagner Cc: Vivek Goyal Cc: Jens Axboe Cc: Steven R

Re: [PATCH 22/23] cgroup: make cgroup_taskset deal with cgroup_subsys_state instead of cgroup

2013-08-05 Thread Daniel Wagner
Zefan Cc: Ingo Molnar Cc: Matt Helsley Cc: Daniel Wagner Cc: Steven Rostedt Nice cleanup. Acked-By: Daniel Wagner cheers, daniel -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org Mor

Re: [PATCH v2 08/23] cgroup: pass around cgroup_subsys_state instead of cgroup in subsystem methods

2013-08-06 Thread Daniel Wagner
_init() fails") is converted too. Suggested by Li Zefan. Signed-off-by: Tejun Heo Acked-by: Li Zefan Acked-by: Michal Hocko Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Johannes Weiner Cc: Balbir Singh Cc: Aristeu Rozanski Cc: Matt Helsley Cc: Daniel Wagner Cc: Vivek Goyal Cc: Jens

brcsmac kernel panic

2013-08-11 Thread Daniel Wagner
Hi, I just updated my laptop (MacBook Air 2012) from 3.11-rc3+ to 3.11-rc4+ and since then brcsmac crashes short after enabling it. Unfortunately, I did also change some config flags in the area of cpufreq (enabling p-state driver) so the configuration is not exactly the same. Before I try to

Re: brcsmac kernel panic

2013-08-13 Thread Daniel Wagner
On 08/13/2013 03:41 PM, Arend van Spriel wrote: On 08/12/2013 10:11 PM, Daniel Wagner wrote: On 08/12/2013 12:38 PM, Arend van Spriel wrote: On 08/11/2013 06:21 PM, Daniel Wagner wrote: I just updated my laptop (MacBook Air 2012) from 3.11-rc3+ to 3.11-rc4+ and since then brcsmac crashes

Re: [PATCH RFC cgroup/for-3.7] cgroup: mark subsystems with broken hierarchy support and whine if cgroups are nested for them

2012-09-17 Thread Daniel Wagner
On 14.09.2012 10:24, Glauber Costa wrote: On 09/13/2012 09:48 PM, Tejun Heo wrote: Hello, Glauber. On Thu, Sep 13, 2012 at 03:53:56PM +0400, Glauber Costa wrote: Here is where the Kconfig option comes to play. If we do it in the kernel, userspace doesn't have to do anything. I spoke with Lenna

Re: [BUG] Bug in netprio_cgroup and netcls_cgroup ?

2013-01-21 Thread Daniel Wagner
Hi Li, On 21.01.2013 07:08, Li Zefan wrote: > I'm not a network developer, so correct me if I'm wrong. > > Since commit 7955490f732c2b8 > ("net: netprio_cgroup: rework update socket logic"), sock->sk->sk_cgrp_prioidx > is set when the socket is created, and won't be updated unless the task is > m

Re: [BUG] Bug in netprio_cgroup and netcls_cgroup ?

2013-01-21 Thread Daniel Wagner
On 21.01.2013 10:01, Li Zefan wrote: > On 2013/1/21 16:50, Daniel Wagner wrote: >> Hi Li, >> >> On 21.01.2013 07:08, Li Zefan wrote: >>> I'm not a network developer, so correct me if I'm wrong. >>> >>> Since commit 7955490f732c2b8 >>

[PATCH v1] net: net_cls: fd passed in SCM_RIGHTS datagram not set correctly

2013-01-21 Thread Daniel Wagner
From: Daniel Wagner Commit 6a328d8c6f03501657ad580f6f98bf9a42583ff7 changed the update logic for the socket but it does not update the SCM_RIGHTS update as well. This patch is based on the net_prio fix commit 48a87cc26c13b68f6cce4e9d769fcb17a6b3e4b8 net: netprio: fd passed in SCM_RIGHTS

Re: [BUG] Bug in netprio_cgroup and netcls_cgroup ?

2013-01-22 Thread Daniel Wagner
On Mon, Jan 21, 2013 at 09:18:38AM -0800, John Fastabend wrote: > On 01/21/2013 01:57 AM, Li Zefan wrote: > > On 2013/1/21 17:27, Daniel Wagner wrote: > >> On 21.01.2013 10:01, Li Zefan wrote: > >>> On 2013/1/21 16:50, Daniel Wagner wrote: > >>>> Hi Li

Re: [BUG] Bug in netprio_cgroup and netcls_cgroup ?

2013-01-23 Thread Daniel Wagner
his I have written a test program, which seems to test the right thing. Please have a look and let me know if it is correct: http://www.monom.org/misc/scm_rights.c And here a dirty first version of the patch: From 49a78d907eaf31c16673025e7e3b4844e419e416 Mon Sep 17 00:00:00 2001 From: Daniel W

ondemand 'regression' after firmware upgrade on MBA

2012-10-11 Thread Daniel Wagner
Hi, I updated the firmware of Macbook Air Mid 2012 model to version 2.5. The changelog from Apple http://support.apple.com/kb/DL1592 "This update fixes an issue where Turbo Boost does not activate when using Boot Camp" indicates that they changed stuff on the ACPI tables. Now I have noticed

Re: [PATCH] Documentation: Update git repository URL for Smack userland tools

2012-09-27 Thread Daniel Wagner
Hi Casey, On 26.09.2012 18:34, Casey Schaufler wrote: On 9/24/2012 5:21 AM, Daniel Wagner wrote: From: Daniel Wagner The userland git repository has been moved to a new place. Signed-off-by: Daniel Wagner Applied to git://git.gitorious.org/smack-next/kernel.git#for-1209 Thanks. BTW, I

hp5300 usb module in linux 2.4.1-ac14

2001-02-16 Thread Daniel Wagner
hi, i tried to test the hp5300 usb module for my scanner but it wasn't buildt. any hints? thx, daniel ps: experimental drivers, scsi and usb are enabled. -- @gpg: http://stud3.tuwien.ac.at/~e9925791/daniel_wagner.asc C63A 06F0 3E2A A039 E830 83A0 C1DA 3479 803F 078F - To unsubscribe

Re: [PATCH] firewire: adopt read cycle timer ABI from raw1394

2007-10-02 Thread Daniel Wagner
Pieter, do applications like yours need the cycle counter only for a few predetermined packets or for each and every packet? We need it for every packet for two reasons: 1) it's the only way to determine how many packets were dropped when packet drops are flagged in the callback Your applicatio

[PATCH v0 0/3] [RESEND] lockperf: a few small improvments

2016-09-22 Thread Daniel Wagner
From: Daniel Wagner Hi Jeff, I had a bunch of small patches in my tree, which I forgot to send. So here they are... cheers, daniel Daniel Wagner (3): Synchronize all clients on start up posix03, posix04: Use '-l' instead of '-i' as option argument name posix03: Do no

[PATCH v0 3/3] posix03: Do not kill everything in the process group

2016-09-22 Thread Daniel Wagner
From: Daniel Wagner kill(0, SIGINT) sends to all in the process group the signal including the parent shell. Instead remember the PIDs of all children and just send the signal to these processes. Reported-by: Dave Chinner Signed-off-by: Daniel Wagner --- posix03.c | 17 +++-- 1

[PATCH v0 1/3] Synchronize all clients on start up

2016-09-22 Thread Daniel Wagner
From: Daniel Wagner The child process start working as soon as they are forked. Sometimes that leads to a workload pattern that no contention happens at all even with a high number of processes. Since the main motivation of this this is to benchmark the contention overhead let the clients wait

[PATCH v0 2/3] posix03, posix04: Use '-l' instead of '-i' as option argument name

2016-09-22 Thread Daniel Wagner
From: Daniel Wagner All other test use '=l' instead of '-i' to as option name for defining how many loops should be executed. Let's streamline posix03 and posix04. Signed-off-by: Daniel Wagner --- posix03.c | 6 +++--- posix04.c | 6 +++--- 2 files changed, 6 i

[PATCH 0/2] NFS: Use complete() instead complete_all()

2016-09-22 Thread Daniel Wagner
From: Daniel Wagner Hi, Using complete_all() is not wrong per se but it suggest that there might be more than one waiter. For -rt I am reviewing all complete_all() users and would like to leave only the real ones in the tree. The main problem for -rt about complete_all() is that it can be uses

[PATCH 2/2] NFS: cache_lib: use complete() instead of complete_all()

2016-09-22 Thread Daniel Wagner
From: Daniel Wagner There is only one waiter for the completion, therefore there is no need to use complete_all(). Let's make that clear by using complete() instead of complete_all(). The generic caching code from sunrpc is calling revisit() only once. The usage pattern of the completi

[PATCH 1/2] NFS: direct: use complete() instead of complete_all()

2016-09-22 Thread Daniel Wagner
From: Daniel Wagner There is only one waiter for the completion, therefore there is no need to use complete_all(). Let's make that clear by using complete() instead of complete_all(). nfs_file_direct_write() or nfs_file_direct_read() allocated a request object via nfs_direct_req_alloc(),

[PATCH] mfd: mc13xxx-core: use complete() instead complete_all()

2016-09-22 Thread Daniel Wagner
From: Daniel Wagner There is only one waiter for the completion, therefore there is no need to use complete_all(). Let's make that clear by using complete() instead of complete_all(). The usage pattern of the completion is: waiter context waker co

[PATCH] usb: gadget: f_fs: use complete() instead complete_all()

2016-09-22 Thread Daniel Wagner
From: Daniel Wagner There is only one waiter for the completion, therefore there is no need to use complete_all(). Let's make that clear by using complete() instead of complete_all(). The usage pattern of the completion is: waiter context waker co

[PATCH] xprtrdma: use complete() instead complete_all()

2016-09-23 Thread Daniel Wagner
From: Daniel Wagner There is only one waiter for the completion, therefore there is no need to use complete_all(). Let's make that clear by using complete() instead of complete_all(). The usage pattern of the completion is: waiter context waker co

[PATCH] omapfb: use complete() instead complete_all()

2016-09-23 Thread Daniel Wagner
From: Daniel Wagner There is only one waiter for the completion, therefore there is no need to use complete_all(). Let's make that clear by using complete() instead of complete_all(). While we are at it, we also change the init_completion() to reinit_completion() which slightly lighter.

Re: [PATCH 0/2] NFS: Use complete() instead complete_all()

2016-09-25 Thread Daniel Wagner
Hi Anna, On 09/23/2016 03:48 PM, Anna Schumaker wrote: Besides trying to analys all the code paths to the wait_for_completion() call and convince myself that there is only one waiter, I also run a few tests: - some fio benchmarks - pynfs -cthon04 Thanks for the patches, and for the extens

Re: [PATCH 0/2] NFS: Use complete() instead complete_all()

2016-09-27 Thread Daniel Wagner
Hi Anna, On 09/26/2016 03:31 PM, Anna Schumaker wrote: > No, there are a handful that we know don't pass. When I run on NFS v4.1, I > get: > > Failures: generic/035 generic/071 generic/128 generic/294 > generic/306 generic/309 generic/310 generic/313 generic/314 > generic/315 generic/316 generi

Re: [PATCH 0/2] NFS: Use complete() instead complete_all()

2016-09-27 Thread Daniel Wagner
On 09/27/2016 09:42 AM, Daniel Wagner wrote: > Failures: generic/035 generic/087 generic/088 generic/089 generic/126 > generic/184 generic/285 generic/347 generic/350 > Failed 9 of 62 tests > > Hmm, not sure if this good or bad. Does it help? FWIW, running the same tests on non

[RFC v0 0/8] Reuse firmware loader helpers

2016-07-28 Thread Daniel Wagner
From: Daniel Wagner Hi, While reviewing all the complete_all() users, I realized there is recouring pattern how the completion API is used to synchronize the stages of the firmware loading. Since firmware_class.c contains a fairly complete implemetation for synching the loading, it worthwhile

[RFC v0 8/8] iwl4965: use firmware_stat instead of completion

2016-07-28 Thread Daniel Wagner
From: Daniel Wagner Loading firmware is an operation many drivers implement in various ways around the completion API. And most of them do it almost in the same way. Let's reuse the firmware_stat API which is used also by the firmware_class loader. Apart of streamlining the firmware lo

[RFC v0 7/8] Input: ims-pcu: use firmware_stat instead of completion

2016-07-28 Thread Daniel Wagner
From: Daniel Wagner Loading firmware is an operation many drivers implement in various ways around the completion API. And most of them do it almost in the same way. Let's reuse the firmware_stat API which is used also by the firmware_class loader. Apart of streamlining the firmware lo

[RFC v0 2/8] selftests: firmware: do not clutter output

2016-07-28 Thread Daniel Wagner
From: Daniel Wagner Some of the test are supposed to fail but we get a few ouptput lines: ./fw_filesystem.sh: line 51: printf: write error: Invalid argument ./fw_filesystem.sh: line 56: printf: write error: No such device ./fw_filesystem.sh: line 62: echo: write error: No such file or directory

[RFC v0 1/8] selftests: firmware: do not abort test too early

2016-07-28 Thread Daniel Wagner
From: Daniel Wagner When running the test script you will get: kselftest/firmware/fw_userhelper.sh: line 69: echo: write error: Resource temporarily unavailable and stops right there. Because the script runs with the '-e' option which will stop the script at any error. We should

[RFC v0 6/8] remoteproc: use firmware_stat instead of completion

2016-07-28 Thread Daniel Wagner
From: Daniel Wagner Loading firmware is an operation many drivers implement in various ways around the completion API. And most of them do it almost in the same way. Let's reuse the firmware_stat API which is used also by the firmware_class loader. Apart of streamlining the firmware lo

[RFC v0 3/8] firmware: Factor out firmware load helpers

2016-07-28 Thread Daniel Wagner
From: Daniel Wagner Factor out the firmware loading synchronization code in order to allow drivers to reuse it. This also documents more clearly what is happening. This is especial useful the drivers which will be converted afterwards. Not everyone has to come with yet another way to handle it

[RFC v0 5/8] ath9k_htc: use firmware_stat instead of completion

2016-07-28 Thread Daniel Wagner
From: Daniel Wagner Loading firmware is an operation many drivers implement in various ways around the completion API. And most of them do it almost in the same way. Let's reuse the firmware_stat API which is used also by the firmware_class loader. Apart of streamlining the firmware lo

[RFC v0 4/8] Input: goodix: use firmware_stat instead of completion

2016-07-28 Thread Daniel Wagner
From: Daniel Wagner Loading firmware is an operation many drivers implement in various ways around the completion API. And most of them do it almost in the same way. Let's reuse the firmware_stat API which is used also by the firmware_class loader. Apart of streamlining the firmware lo

Re: [RFC v0 4/8] Input: goodix: use firmware_stat instead of completion

2016-07-28 Thread Daniel Wagner
On 07/28/2016 01:22 PM, Bastien Nocera wrote: On Thu, 2016-07-28 at 09:55 +0200, Daniel Wagner wrote: From: Daniel Wagner Loading firmware is an operation many drivers implement in various ways around the completion API. And most of them do it almost in the same way. Let's reus

Re: [RFC v0 4/8] Input: goodix: use firmware_stat instead of completion

2016-07-28 Thread Daniel Wagner
Looking at the API, I really don't like the mixing of namespaces. Either it's fw_ or it's firmware_ but not a mix of both. I agree, that was not really clever. struct fw_loading { ... } __fw_loading_*() fw_loading_*() Would that make more sense? firmware_loading_ as pre

Re: [PATCH 0/2] *** Latency Histogram ***

2016-07-28 Thread Daniel Wagner
On 07/28/2016 03:10 PM, Steven Rostedt wrote: Note, Daniel did start work on upstreaming this previously: http://lkml.kernel.org/r/1430388385-29558-1-git-send-email-daniel.wag...@bmw-carit.de There are a few things that do need to be cleaned up before this can go upstream. Please coordinate

Re: [RFC v0 3/8] firmware: Factor out firmware load helpers

2016-07-28 Thread Daniel Wagner
It's somewhat odd to me that the structure is "firmware_stat" but most of the functions are "fw_loading_*". That seems inconsistent for a structure that is (currently) only used by these functions. I agree, my proposal is odd. I would personally do either: a) "struct fw_load_status" and "fw_

Re: [RFC v0 3/8] firmware: Factor out firmware load helpers

2016-07-28 Thread Daniel Wagner
On 07/28/2016 07:57 PM, Dmitry Torokhov wrote: On Thu, Jul 28, 2016 at 09:55:07AM +0200, Daniel Wagner wrote: +int __firmware_stat_wait(struct firmware_stat *fwst, + long timeout) +{ + int err; + err = swait_event_interruptible_timeout(fwst->

Re: [RFC v0 7/8] Input: ims-pcu: use firmware_stat instead of completion

2016-07-28 Thread Daniel Wagner
On 07/28/2016 09:01 PM, Bjorn Andersson wrote: On Thu 28 Jul 11:33 PDT 2016, Dmitry Torokhov wrote: On Thu, Jul 28, 2016 at 09:55:11AM +0200, Daniel Wagner wrote: From: Daniel Wagner [..] Do not quite like it... I'd rather asynchronous request give out a firmware status pointer

Re: [RFC v0 7/8] Input: ims-pcu: use firmware_stat instead of completion

2016-08-01 Thread Daniel Wagner
On 07/31/2016 09:23 AM, Dmitry Torokhov wrote: On July 30, 2016 9:58:17 AM PDT, "Luis R. Rodriguez" wrote: On Sat, Jul 30, 2016 at 02:42:41PM +0200, Arend van Spriel wrote: On 29-07-16 08:13, Daniel Wagner wrote: On 07/28/2016 09:01 PM, Bjorn Andersson wrote: On Thu 28 Jul 11:3

[PATCH v4 1/4] firmware: Move umh locking code into fw_load_from_user_helper()

2016-09-07 Thread Daniel Wagner
From: Daniel Wagner When we load the firmware directly we don't need to take the umh lock. So move this part inside fw_load_from_user_helper which is only available when CONFIG_FW_LOADER_USER_HELPER is set. This avoids a dependency on firmware_loading_timeout() even

[PATCH v4 3/4] firmware: Drop bit ops in favor of simple state machine

2016-09-07 Thread Daniel Wagner
From: Daniel Wagner We track the state of the loading with bit ops. Since the state machine has only a couple of states and there are only a few simple state transition we can model this simplify. UNKNOWN -> LOADING -> DONE | ABORTED Signed-off-by: Daniel Wagner Cc: Ming L

[PATCH v4 2/4] firmware: encapsulate firmware loading status

2016-09-07 Thread Daniel Wagner
From: Daniel Wagner The firmware user helper code tracks the current state of the loading process via unsigned long status and a complection in struct firmware_buf. We only need this for the usermode helper as such we can encapsulate all this data into its own data structure. Signed-off-by

[PATCH v4 0/4] firmware: encapsulate firmware loading status

2016-09-07 Thread Daniel Wagner
From: Daniel Wagner Hi, This is version depends on Luis' '[PATCH v4 0/5] firmware: add SmPL grammar to avoid issues' series [1]. Because of that I was able to get rid of loading_timeout and firmware_loading_timeout() in the !FW_LOADER_USER_HELPER_FALLBACK case. cheers, dani

[PATCH v4 4/4] firmware: Do not use fw_lock for fw_status protection

2016-09-07 Thread Daniel Wagner
From: Daniel Wagner fw_lock is to use to protect 'corner cases' inside firmware_class. It is not exactly clear what those corner cases are nor what it exactly protects. fw_status can be used without needing the fw_lock to protect its state transition and wake ups. fw_status is holds

Re: [PATCH v6 3/4] tracing: Add trace_irqsoff tracepoints

2016-09-07 Thread Daniel Wagner
On 09/07/2016 06:42 PM, Thomas Gleixner wrote: On Wed, 7 Sep 2016, Binoy Jayan wrote: This work is based on work by Daniel Wagner. A few tracepoints are added Interesting. The patch you are referring to was written by Carsten Emde. Can you please get these attributions right? They want to be

Re: [PATCH v4 2/4] firmware: encapsulate firmware loading status

2016-09-08 Thread Daniel Wagner
On 09/08/2016 03:39 AM, Luis R. Rodriguez wrote: On Wed, Sep 07, 2016 at 10:45:06AM +0200, Daniel Wagner wrote: From: Daniel Wagner timeout = MAX_JIFFY_OFFSET; } - retval = wait_for_completion_interruptible_timeout(&buf->com

Re: [PATCH v4 2/4] firmware: encapsulate firmware loading status

2016-09-08 Thread Daniel Wagner
On 09/08/2016 10:05 AM, Daniel Wagner wrote: This while loop was originally a goto loop: 1f2b79599ee8 ("firmware loader: always let firmware_buf own the pages buffer") I don't think the code doesn't do what it was indented to do. The reason is that callin

Re: [PATCH v4 2/4] firmware: encapsulate firmware loading status

2016-09-08 Thread Daniel Wagner
Hi Ming, On 09/08/2016 01:26 PM, Ming Lei wrote: On Wed, Sep 7, 2016 at 4:45 PM, Daniel Wagner wrote: From: Daniel Wagner +static int fw_status_wait_timeout(struct fw_status *fw_st, long timeout) +{ + int ret; + + ret = wait_for_completion_interruptible_timeout(&fw_st->com

Re: [PATCH v4 2/4] firmware: encapsulate firmware loading status

2016-09-08 Thread Daniel Wagner
On 09/07/2016 10:45 AM, Daniel Wagner wrote: @@ -702,7 +760,7 @@ static ssize_t firmware_loading_store(struct device *dev, dev_err(dev, "%s: unexpected value (%d)\n", __func__, loading); /* fallthrough */ case -1: - fw_load_abo

Re: [PATCH v4 1/4] firmware: Move umh locking code into fw_load_from_user_helper()

2016-09-08 Thread Daniel Wagner
esume. Okay, so let's finish this round of refactoring first. I prefer going in smaller steps and see if there are any regressions with those changes. Signed-off-by: Daniel Wagner Cc: Ming Lei Cc: Luis R. Rodriguez Cc: Greg Kroah-Hartman --- drivers/base/firmware_class.c | 52 ++

Re: [PATCH v4 3/4] firmware: Drop bit ops in favor of simple state machine

2016-09-08 Thread Daniel Wagner
On 09/08/2016 03:45 AM, Luis R. Rodriguez wrote: On Wed, Sep 07, 2016 at 10:45:07AM +0200, Daniel Wagner wrote: From: Daniel Wagner We track the state of the loading with bit ops. Since the state machine has only a couple of states and there are only a few simple state transition And they

[PATCH 1/3] csiostor: fix completion usage

2016-09-13 Thread Daniel Wagner
From: Daniel Wagner The (re)initialzing of the completion object should be done before we trigger the transfer. Doing this after triggering the hardware opens up a race window. Without the timeout we would problaly even deadlock. Use also reinit_completion because we initalize the whole data

[PATCH 0/3] wireless: Use complete() instead complete_all()

2016-09-13 Thread Daniel Wagner
From: Daniel Wagner Hi, Using complete_all() is not wrong per se but it suggest that there might be more than one waiter. For -rt I am reviewing all complete_all() users and would like to leave only the real ones in the tree. The main problem for -rt about complete_all() is that it can be uses

[PATCH 3/3] virtio_scsi: use complete() instead complete_all()

2016-09-13 Thread Daniel Wagner
From: Daniel Wagner There is only one waiter for the completion, therefore there is no need to use complete_all(). Let's make that clear by using complete() instead of complete_all(). The usage pattern of the completion is: waiter context waker context virtscs

[PATCH 2/3] sym53c8xx_2: use complete() instead complete_all()

2016-09-13 Thread Daniel Wagner
From: Daniel Wagner There is only one waiter for the completion, therefore there is no need to use complete_all(). Let's make that clear by using complete() instead of complete_all(). The usage pattern of the completion is: waiter context waker context sym_eh_ha

Re: [PATCH v5 2/5] firmware: encapsulate firmware loading status

2016-09-13 Thread Daniel Wagner
Hi Luis, On 09/09/2016 02:12 PM, Daniel Wagner wrote: The firmware user helper code tracks the current state of the loading process via unsigned long status and a complection in struct firmware_buf. We only need this for the usermode helper as such we can encapsulate all this data into its own

Re: [PATCH v3 5/5] firmware: fix fw cache to avoid usermode helper on suspend

2016-08-31 Thread Daniel Wagner
Hi Luis, On 08/24/2016 02:45 AM, mcg...@kernel.org wrote: diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c index 22d1760a4278..dca4f9cbf4db 100644 --- a/drivers/base/firmware_class.c +++ b/drivers/base/firmware_class.c @@ -1412,7 +1412,7 @@ static int cache_firmware(con

Re: [PATCH v3 1/3] firmware_class: encapsulate firmware loading status

2016-08-31 Thread Daniel Wagner
Hi Luis, On 08/30/2016 09:34 PM, Luis R. Rodriguez wrote: On Mon, Aug 29, 2016 at 04:18:33PM +0200, Daniel Wagner wrote: On 08/29/2016 11:50 AM, Daniel Wagner wrote: I forgot to answer your question. So we have the dependency to loading_timeout/firmware_loading_timeout from the firmware

[PATCH 1/4] misc: mic: scif: use complete() instead of complete_all()

2016-08-05 Thread Daniel Wagner
From: Daniel Wagner There is only one waiter for the completion, therefore there is no need to use complete_all(). Let's make that clear by using complete() instead of complete_all(). The usage pattern of the completion is: waiter context waker co

[PATCH 0/4] Use complete() instead of complete_all()

2016-08-05 Thread Daniel Wagner
From: Daniel Wagner Hi, Using complete_all() is not wrong per se but it suggest that there might be more than one reader. For -rt I am reviewing all complete_all() users and would like to leave only the real ones in the tree. The main problem for -rt about complete_all() is that it can be uses

[PATCH 2/4] misc: mic: vop: use complete() instead of complete_all()

2016-08-05 Thread Daniel Wagner
From: Daniel Wagner There is only one waiter for the completion, therefore there is no need to use complete_all(). Let's make that clear by using complete() instead of complete_all(). The usage pattern of the completion is: waiter context waker co

[PATCH 3/4] misc: ti-st: use complete() instead of complete_all()

2016-08-05 Thread Daniel Wagner
From: Daniel Wagner There is only one waiter for the completion, therefore there is no need to use complete_all(). Let's make that clear by using complete() instead of complete_all(). The usage pattern of the completion is: waiter context waker co

[PATCH 4/4] misc: tifm: use complete() instead of complete_all()

2016-08-05 Thread Daniel Wagner
From: Daniel Wagner There is only one waiter for the completion, therefore there is no need to use complete_all(). Let's make that clear by using complete() instead of complete_all(). The usage pattern of the completion is: waiter context waker co

Re: [PATCH v2 0/3] *** Latency histograms - IRQSOFF,PREEMPTOFF ***

2016-08-24 Thread Daniel Wagner
Hi Binoy, On 08/24/2016 01:17 PM, Binoy Jayan wrote: Histogram output: cat /sys/kernel/debug/tracing/events/latency/latency_irqs/hist cat /sys/kernel/debug/tracing/events/latency/latency_preempt/hist cat /sys/kernel/debug/tracing/events/latency/latency_critical_timings/hist cat /sys/kernel/debug

[PATCH v3 3/3] firmware_class: Do not use fw_lock for fw_status protection

2016-08-25 Thread Daniel Wagner
From: Daniel Wagner fw_lock is to use to protect 'corner cases' inside firmware_class. It is not exactly clear what those corner cases are nor what it exactly protects. fw_status can be used without needing the fw_lock to protect its state transition and wake ups. fw_status is holds

[PATCH v3 0/3] firmware_class: encapsulate firmware loading status

2016-08-25 Thread Daniel Wagner
From: Daniel Wagner This version should address all comments from Luis. In the last patch the fw_lock dependency is dropped. This only works if we garantee not to race between the reader and the writer side in combination in going to sleep and waking up. So here that should now be a good

[PATCH v3 1/3] firmware_class: encapsulate firmware loading status

2016-08-25 Thread Daniel Wagner
From: Daniel Wagner The firmware user helper code tracks the current state of the loading process via unsigned long status and a complection in struct firmware_buf. We only need this for the usermode helper as such we can encapsulate all this data into its own data structure. Signed-off-by

  1   2   3   4   5   6   7   8   >