Re: Small System Paging Problem - OOM-killer goes nuts

2007-11-26 Thread ming lei
It seems oom happenes when VM(page frame reclaim) try to reclaim much more memory by writing back dirty pages, but there is not enough ram for usb disk related driver to finish the writeback operation. (usb disk related driver: scsi_mod, usb mass storage, usbcore and uhci or ehci ) You can try

Re: void* arithmnetic

2007-11-28 Thread Ming Lei
2007/11/29, Jan Engelhardt [EMAIL PROTECTED]: On Nov 29 2007 01:05, J.A. Magallón wrote: Since begin of the ages the build of the nvidia driver says things like this: Explicitly adding -Wpointer-arith to ones own Makefile is like admitting the code might be problematic. :- I think

[RFC][PATCH] fix bus error when trying to access anon shared page created by mremap()[BUG:8691]

2007-12-13 Thread Ming Lei
,__FILE__,__LINE__);/* can't reach here*/ return 0; } Signed-off-by: Ming Lei [EMAIL PROTECTED] --- diff --git a/mm/shmem.c b/mm/shmem.c index 51b3d6c..7e14bce 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -1327,15 +1327,23 @@ failed: return error; } +static struct vfsmount

Re: [PATCH v3 2/6] PM / Runtime: introduce pm_runtime_set[get]_memalloc_noio()

2012-10-29 Thread Ming Lei
On Mon, Oct 29, 2012 at 11:41 PM, Alan Stern st...@rowland.harvard.edu wrote: On Mon, 29 Oct 2012, Ming Lei wrote: The patch introduces the flag of memalloc_noio_resume in 'struct dev_pm_info' to help PM core to teach mm not allocating memory with GFP_KERNEL flag for avoiding probable

Re: [PATCH v3 2/6] PM / Runtime: introduce pm_runtime_set[get]_memalloc_noio()

2012-10-30 Thread Ming Lei
the disk into device model via register_disk(), the solution should be fine. Thanks, -- Ming Lei -- 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: [PATCH v3 2/6] PM / Runtime: introduce pm_runtime_set[get]_memalloc_noio()

2012-10-30 Thread Ming Lei
during resets. That would also help with the race described above. I have thought about this. IMO, pm_runtime_get_memalloc_noio should return true always if CONFIG_PM_RUNTIME is unset. Thanks, -- Ming Lei -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body

Re: [PATCH v3 2/6] PM / Runtime: introduce pm_runtime_set[get]_memalloc_noio()

2012-10-30 Thread Ming Lei
On Wed, Oct 31, 2012 at 12:00 AM, Ming Lei ming@canonical.com wrote: Looks the simplest approach is to handle the noio flag thing at the start and end of rpm_resume. Sorry, that doesn't work, runtime_suspend need that too because memory allocation with block I/O might deadlock when doing I

Re: [PATCH v3 2/6] PM / Runtime: introduce pm_runtime_set[get]_memalloc_noio()

2012-10-30 Thread Ming Lei
, so looks no good solution for the problem, and maybe we have to set the flag always before resetting usb device. Thanks, -- Ming Lei -- 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

Re: [PATCH v3 2/6] PM / Runtime: introduce pm_runtime_set[get]_memalloc_noio()

2012-10-30 Thread Ming Lei
On Wed, Oct 31, 2012 at 10:08 AM, Ming Lei ming@canonical.com wrote: I am afraid it is, because a disk may just have been probed as the deviceis being reset. Yes, it is probable, and sounds like similar with 'root_wait' problem, see prepare_namespace(): init/do_mounts.c, so looks no good

Re: [PATCH v3 2/6] PM / Runtime: introduce pm_runtime_set[get]_memalloc_noio()

2012-10-31 Thread Ming Lei
the noio flag during every device reset. Yes, it's better to set the flag during every device reset now. Also pppoe or network interface over serial port is a bit difficult to deal with, as Oliver pointed out. Thanks, -- Ming Lei -- To unsubscribe from this list: send the line unsubscribe linux

Re: [BUG] Deferred probing in driver model is racy, resulting in lost probes

2012-09-26 Thread Ming Lei
On Thu, Sep 27, 2012 at 4:23 AM, Russell King - ARM Linux li...@arm.linux.org.uk wrote: On Wed, Sep 26, 2012 at 01:08:33PM -0700, Greg Kroah-Hartman wrote: On Sun, Sep 16, 2012 at 09:24:43PM +0800, Ming Lei wrote: diff --git a/drivers/base/bus.c b/drivers/base/bus.c index 181ed26..17d7437

Re: Question on irq autoprobe

2012-09-26 Thread Ming Lei
On Fri, Sep 14, 2012 at 10:02 AM, Ming Lei tom.leim...@gmail.com wrote: Hi, I see the below comments on probe_irq_off: * BUGS: When used in a module (which arguably shouldn't happen) * nothing prevents two IRQ probe callers from overlapping. The * results of this are non

Re: [BUG] Deferred probing in driver model is racy, resulting in lost probes

2012-09-27 Thread Ming Lei
On Thu, Sep 27, 2012 at 10:03 PM, Russell King - ARM Linux li...@arm.linux.org.uk wrote: On Thu, Sep 27, 2012 at 02:58:09PM +0100, Russell King - ARM Linux wrote: On Thu, Sep 27, 2012 at 07:47:46AM +0800, Ming Lei wrote: On Thu, Sep 27, 2012 at 4:23 AM, Russell King - ARM Linux li

Re: [BUG] Deferred probing in driver model is racy, resulting in lost probes

2012-09-27 Thread Ming Lei
by calling atmel_ssc_set_audio more than one time. Thanks, -- Ming Lei -- 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 the FAQ at http

[PATCH] driver core: fix possible missing of device probe

2012-09-27 Thread Ming Lei
. Reported-and-Tested-by: Russell King li...@arm.linux.org.uk Cc: sta...@vger.kernel.org Signed-off-by: Ming Lei ming@canonical.com --- drivers/base/bus.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/base/bus.c b/drivers/base/bus.c index 181ed26..3b5bddb 100644

[PATCH v4 0/6] solve deadlock caused by memory allocation with I/O

2012-11-03 Thread Ming Lei
/vmscan.c | 12 ++ net/core/net-sysfs.c |5 +++ Thanks, -- Ming Lei -- 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

[PATCH v4 1/6] mm: teach mm by current context info to not do I/O during memory allocation

2012-11-03 Thread Ming Lei
...@sisk.pl Signed-off-by: Minchan Kim minc...@kernel.org Signed-off-by: Ming Lei ming@canonical.com --- v4: - fix comment v3: - no change v2: - remove changes on 'may_writepage' and 'may_swap' because that isn't related with the patchset, and can't introduce I/O

[PATCH v4 2/6] PM / Runtime: introduce pm_runtime_set_memalloc_noio()

2012-11-03 Thread Ming Lei
-by: Ming Lei ming@canonical.com --- v4: - rename memalloc_noio_resume as memalloc_noio - remove pm_runtime_get_memalloc_noio() - add comments on pm_runtime_set_memalloc_noio v3: - introduce pm_runtime_get_memalloc_noio() - hold one global lock

[PATCH v4 3/6] block/genhd.c: apply pm_runtime_set_memalloc_noio on block devices

2012-11-03 Thread Ming Lei
This patch applyes the introduced pm_runtime_set_memalloc_noio on block device so that PM core will teach mm to not allocate memory with GFP_IOFS when calling the runtime_resume and runtime_suspend callback for block devices and its ancestors. Cc: Jens Axboe ax...@kernel.dk Signed-off-by: Ming

[PATCH v4 4/6] net/core: apply pm_runtime_set_memalloc_noio on network devices

2012-11-03 Thread Ming Lei
...@davemloft.net Cc: Eric Dumazet eric.duma...@gmail.com Cc: David Decotigny david.decoti...@google.com Cc: Tom Herbert therb...@google.com Cc: Ingo Molnar mi...@elte.hu Signed-off-by: Ming Lei ming@canonical.com --- v4: - call pm_runtime_set_memalloc_noio(ddev, true) after device_add

[PATCH v4 5/6] PM / Runtime: force memory allocation with no I/O during Runtime PM callbcack

2012-11-03 Thread Ming Lei
: Rafael J. Wysocki r...@sisk.pl Signed-off-by: Ming Lei ming@canonical.com --- v4: - runtime_suspend need this too because rpm_resume may wait for completion of concurrent runtime_suspend, so deadlock still may be triggered in runtime_suspend path. --- drivers/base/power

[PATCH v4 6/6] USB: forbid memory allocation with I/O during bus reset

2012-11-03 Thread Ming Lei
() and the storage interface can't do I/O transfer when the reset is triggered by other interface, or the error handling can't be completed if the reset is triggered by the storage itself(error handling path). Cc: Alan Stern st...@rowland.harvard.edu Cc: Oliver Neukum oneu...@suse.de Signed-off-by: Ming Lei ming

[PATCH 1/2] firmware loader: introduce module parameter to customize(v4) fw search path

2012-11-03 Thread Ming Lei
when 'firmware_class' is built in kernel: firmware_class.path=$CUSTOMIZED_PATH [1], https://lkml.org/lkml/2012/10/11/337 Cc: Linus Torvalds torva...@linux-foundation.org Signed-off-by: Ming Lei ming@canonical.com --- v4: - fix one comment and rebase on the latest next tree v3

[PATCH 2/2] firmware loader: document firmware cache mechanism

2012-11-03 Thread Ming Lei
From: Ming Lei tom.leim...@gmail.com This patch documents the firmware cache mechanism so that users of request_firmware() know that it can be called safely inside device's suspend and resume callback, and the device's firmware needn't be cached any more by individual driver itself to deal

Re: [PATCH RFC 0/4] Add firmware signature file check

2012-11-05 Thread Ming Lei
check failed, current firmware load will fallback on udev to complete loading, so looks a check-failed firmware still can be loaded into kernel no matter if there is firmware signature check or not. Thanks, -- Ming Lei -- To unsubscribe from this list: send the line unsubscribe linux-kernel

Re: [PATCH RFC 0/4] Add firmware signature file check

2012-11-05 Thread Ming Lei
loading from user space only if verify_signature() returns false. And the udev loading should be resorted to if there is no such firmware file in default search paths. /* fall back on userspace loading */ buf-fmt = PAGE_BUF; Thanks, -- Ming Lei -- To unsubscribe from this list

Re: [PATCH RFC 0/4] Add firmware signature file check

2012-11-05 Thread Ming Lei
(buf, path)) + success = true; + } When direct loading failed, it means that the firmware isn't under the default search path, so the above verification might return false always. Thanks, -- Ming Lei -- To unsubscribe from this list: send the line unsubscribe linux

Re: [PATCH RFC 0/4] Add firmware signature file check

2012-11-06 Thread Ming Lei
On Tue, Nov 6, 2012 at 3:32 PM, Takashi Iwai ti...@suse.de wrote: At Tue, 6 Nov 2012 15:16:43 +0800, Ming Lei wrote: On Tue, Nov 6, 2012 at 3:03 PM, Takashi Iwai ti...@suse.de wrote: Yeah, it's just uncovered in the patch. As a easy solution, apply the patch like below to disallow

Re: [PATCH RFC 0/4] Add firmware signature file check

2012-11-06 Thread Ming Lei
space loading. Thanks, -- Ming Lei -- 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 the FAQ at http://www.tux.org/lkml/

Re: [PATCH RFC 0/4] Add firmware signature file check

2012-11-06 Thread Ming Lei
On Tue, Nov 6, 2012 at 6:17 PM, Takashi Iwai ti...@suse.de wrote: At Tue, 6 Nov 2012 18:04:36 +0800, Ming Lei wrote: On Tue, Nov 6, 2012 at 4:18 PM, Takashi Iwai ti...@suse.de wrote: Right, and it's intentionally dropped so. For the non-default fw path, it can be added via proc

Re: [PATCH RFC 0/4] Add firmware signature file check

2012-11-06 Thread Ming Lei
on normal machines, unfortunately. Kernel guys will put one eye on bug report, also enabling udev log can help the problem too. Thanks, -- Ming Lei -- 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

Re: [PATCH v4 1/6] mm: teach mm by current context info to not do I/O during memory allocation

2012-11-06 Thread Ming Lei
didn't think about it too hard ;) Yes, we can do it by initializing 'shrink' local variable just after the branch, so one writing is enough. Will do it in -v5. Thanks, -- Ming Lei -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord

Re: [PATCH v4 2/6] PM / Runtime: introduce pm_runtime_set_memalloc_noio()

2012-11-06 Thread Ming Lei
(dev_hotplug_mutex); +} +EXPORT_SYMBOL_GPL(pm_runtime_set_memalloc_noio); Thanks, -- Ming Lei -- 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: [PATCH v4 0/6] solve deadlock caused by memory allocation with I/O

2012-11-06 Thread Ming Lei
On Wed, Nov 7, 2012 at 7:23 AM, Andrew Morton a...@linux-foundation.org wrote: It generally looks OK to me. I have a few comments and I expect to grab v5. Andrew, thanks for your review, and I will prepare -v5 later. Thanks, -- Ming Lei -- To unsubscribe from this list: send the line

Re: [PATCH v4 1/6] mm: teach mm by current context info to not do I/O during memory allocation

2012-11-06 Thread Ming Lei
)), .b = b1, }; which is a bit arcane but not t bad. Have a think about it... Got it, looks memalloc_noio_flags() neater, and I will take it in v5. Thanks, -- Ming Lei -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord

Re: [PATCH] firmware loader: Fix the race FW_STATUS_DONE is followed by class_timeout

2012-11-07 Thread Ming Lei
(fw_priv); } Also the lock of 'fw_lock' should be held when setting 'FW_STATUS_DONE' in _request_firmware_load(). Could you send out a new patch to fix the race? Thanks, -- Ming Lei -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord

Re: [PATCH V2] firmware loader: Fix the race FW_STATUS_DONE is followed by class_timeout

2012-11-07 Thread Ming Lei
); - del_timer_sync(fw_priv-timeout); + cancel_delayed_work_sync(fw_priv-timeout_work); handle_fw: mutex_lock(fw_lock); -- 1.7.0.4 Thanks, -- Ming Lei -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More

Re: [PATCH V3] firmware loader: Fix the race FW_STATUS_DONE is followed by class_timeout

2012-11-08 Thread Ming Lei
into sched_work to benefit from using fw_lock mutex also. Signed-off-by: liu chuansheng chuansheng@intel.com Acked-by: Ming Lei ming@canonical.com Thanks, -- Ming Lei -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord

Re: [PATCH 0/4] firmware loader: misc changes

2012-10-21 Thread Ming Lei
On Tue, Oct 9, 2012 at 12:01 PM, Ming Lei ming@canonical.com wrote: Hi, The first two are fixes' patch, the 3rd one is to enable caching firmware for direct loading, and the last one is a cleanup patch. drivers/base/firmware_class.c | 266

Re: [PATCH 0/4] firmware loader: misc changes

2012-10-21 Thread Ming Lei
On Mon, Oct 22, 2012 at 12:14 AM, Greg Kroah-Hartman gre...@linuxfoundation.org wrote: Yes, sorry, they are still in my queue, I was working on other fixes for other subsystems this past week. I'll get to these tomorrow. No problem, thanks for your work, :-) Thank, -- Ming Lei

[RFC PATCH v2 0/6] solve deadlock caused by memory allocation with I/O

2012-10-22 Thread Ming Lei
|5 +++ 9 files changed, 127 insertions(+), 2 deletions(-) Thanks, -- Ming Lei -- 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 the FAQ

[RFC PATCH v2 1/6] mm: teach mm by current context info to not do I/O during memory allocation

2012-10-22 Thread Ming Lei
: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com Cc: Michal Hocko mho...@suse.cz Cc: Ingo Molnar mi...@redhat.com Cc: Peter Zijlstra pet...@infradead.org Cc: Rafael J. Wysocki r...@sisk.pl Signed-off-by: Minchan Kim minc...@kernel.org Signed-off-by: Ming Lei ming@canonical.com --- v2

[RFC PATCH v2 2/6] PM / Runtime: introduce pm_runtime_set_memalloc_noio()

2012-10-22 Thread Ming Lei
in the path from one block or network device to the root device in the device tree may cause deadlock, the introduced pm_runtime_set_memalloc_noio() sets or clears the flag on device of the path recursively. Cc: Rafael J. Wysocki r...@sisk.pl Signed-off-by: Ming Lei ming@canonical.com --- drivers/base

[RFC PATCH v2 3/6] block/genhd.c: apply pm_runtime_set_memalloc_noio on block devices

2012-10-22 Thread Ming Lei
This patch applyes the introduced pm_runtime_set_memalloc_noio on block device so that PM core will teach mm to not allocate memory with GFP_IOFS when calling the runtime_resume callback for block devices. Cc: Jens Axboe ax...@kernel.dk Signed-off-by: Ming Lei ming@canonical.com --- block

[RFC PATCH v2 4/6] net/core: apply pm_runtime_set_memalloc_noio on network devices

2012-10-22 Thread Ming Lei
Dumazet eric.duma...@gmail.com Cc: David Decotigny david.decoti...@google.com Cc: Tom Herbert therb...@google.com Cc: Ingo Molnar mi...@elte.hu Signed-off-by: Ming Lei ming@canonical.com --- net/core/net-sysfs.c |5 + 1 file changed, 5 insertions(+) diff --git a/net/core/net-sysfs.c b

[RFC PATCH v2 5/6] PM / Runtime: force memory allocation with no I/O during runtime_resume callbcack

2012-10-22 Thread Ming Lei
. Wysocki r...@sisk.pl Signed-off-by: Ming Lei ming@canonical.com --- drivers/base/power/runtime.c | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/drivers/base/power/runtime.c b/drivers/base/power/runtime.c index a75eeca..c61b7b0 100644 --- a/drivers/base/power

[RFC PATCH v2 6/6] USB: forbid memory allocation with I/O during bus reset

2012-10-22 Thread Ming Lei
() and the storage interface can't do I/O transfer when the reset is triggered by other interface, or the error handling can't be completed if the reset is triggered by the storage itself(error handling path). Cc: Alan Stern st...@rowland.harvard.edu Cc: Oliver Neukum oneu...@suse.de Signed-off-by: Ming Lei ming

Re: [RFC PATCH v2 4/6] net/core: apply pm_runtime_set_memalloc_noio on network devices

2012-10-23 Thread Ming Lei
On Tue, Oct 23, 2012 at 3:18 AM, Alan Stern st...@rowland.harvard.edu wrote: On Mon, 22 Oct 2012, Ming Lei wrote: Is this really needed? Even with iSCSI, doesn't register_disk() have to be called for the underlying block device? And given your 3/6 patch, wouldn't that mark the network

Re: [RFC PATCH v2 6/6] USB: forbid memory allocation with I/O during bus reset

2012-10-23 Thread Ming Lei
On Mon, Oct 22, 2012 at 10:37 PM, Alan Stern st...@rowland.harvard.edu wrote: On Mon, 22 Oct 2012, Ming Lei wrote: + /* + * Don't allocate memory with GFP_KERNEL in current + * context to avoid possible deadlock if usb mass + * storage interface or usbnet interface(iSCSI

Re: [RFC PATCH v2 2/6] PM / Runtime: introduce pm_runtime_set_memalloc_noio()

2012-10-23 Thread Ming Lei
-safe without locking. You mean one ancestor device might not be in active when one of its descendants is being probed or removed? Thanks, -- Ming Lei -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More

Re: [PATCH 1/3 v2] firmware: Convert firmware path setup from an array to a list

2012-10-23 Thread Ming Lei
firmware just after rootfs is mounted. kernel parameter should be a good way to pass one customerized path. Thanks, -- Ming Lei -- 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

Re: [PATCH 1/3 v2] firmware: Convert firmware path setup from an array to a list

2012-10-23 Thread Ming Lei
for firmware path listing. Should I amend the commit description so it is not misleading and remove the 'updating' part? In fact, I also questioned on path listing too in last thread too. Thanks, -- Ming Lei -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body

[PATCH -next] printk: fix broken 'console' kernel parameter

2012-10-23 Thread Ming Lei
-foundation.org Cc: Samuel Thibault samuel.thiba...@ens-lyon.org Cc: Joe Perches j...@perches.com Signed-off-by: Ming Lei ming@canonical.com --- kernel/printk/braille.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/printk/braille.h b/kernel/printk/braille.h index d2e6bc3

Re: [PATCH 1/3 v2] firmware: Convert firmware path setup from an array to a list

2012-10-23 Thread Ming Lei
, -- Ming Lei -- 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 the FAQ at http://www.tux.org/lkml/

Re: [RFC PATCH v2 2/6] PM / Runtime: introduce pm_runtime_set_memalloc_noio()

2012-10-23 Thread Ming Lei
On Tue, Oct 23, 2012 at 10:46 PM, Alan Stern st...@rowland.harvard.edu wrote: On Tue, 23 Oct 2012, Ming Lei wrote: On Mon, Oct 22, 2012 at 10:33 PM, Alan Stern st...@rowland.harvard.edu wrote: Tail recursion should be implemented as a loop, not as an explicit recursion

[PATCH 1/2] firmware loader: document kernel direct loading

2012-10-23 Thread Ming Lei
This patch adds description on recently introduced direct firmware loading by Linus. Cc: Linus Torvalds torva...@linux-foundation.org Signed-off-by: Ming Lei ming@canonical.com --- Documentation/firmware_class/README | 26 +- 1 file changed, 17 insertions(+), 9

[PATCH 2/2] firmware loader: introduce kernel parameter to customize fw search path

2012-10-23 Thread Ming Lei
-foundation.org Signed-off-by: Ming Lei ming@canonical.com --- Documentation/firmware_class/README |1 + Documentation/kernel-parameters.txt |9 + drivers/base/firmware_class.c | 24 ++-- 3 files changed, 32 insertions(+), 2 deletions(-) diff --git

Re: [PATCH 2/2] firmware loader: introduce kernel parameter to customize fw search path

2012-10-23 Thread Ming Lei
, can override it easily. Sound like still a solution, :-) If you agree on module parameter, that might be more flexible, IMO Thanks, -- Ming Lei -- 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

Re: [PATCH 2/2] firmware loader: introduce kernel parameter to customize fw search path

2012-10-24 Thread Ming Lei
it as module parameter, sorry about that. Thanks, -- Ming Lei -- 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 the FAQ at http://www.tux.org/lkml/

Re: [Q] console= command line ignored?

2012-10-24 Thread Ming Lei
a solution immediately at hand. Thanks, -- Ming Lei -- 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 the FAQ at http://www.tux.org/lkml/

Re: [PATCH] firmware: Don't attempt to allocate zero bytes with vmalloc()

2012-10-08 Thread Ming Lei
it as a failure? Thanks, -- Ming Lei -- 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 the FAQ at http://www.tux.org/lkml/

[PATCH 0/4] firmware loader: misc changes

2012-10-08 Thread Ming Lei
Hi, The first two are fixes' patch, the 3rd one is to enable caching firmware for direct loading, and the last one is a cleanup patch. drivers/base/firmware_class.c | 266 +++-- 1 file changed, 151 insertions(+), 115 deletions(-) Thanks, -- Ming Lei

[PATCH 1/4] firmware loader: cancel uncache work before caching firmware

2012-10-08 Thread Ming Lei
the cacheing firmware mechanism a bit by only storing one firmware cache entry for one firmware image. So if the firmware is still cached during suspend, it doesn't need to be loaded from user space any more. Signed-off-by: Ming Lei ming@canonical.com --- drivers/base/firmware_class.c | 35

[PATCH 2/4] firmware loader: fix one reqeust_firmware race

2012-10-08 Thread Ming Lei
Several loading requests may be pending on one same firmware buf, and this patch moves fw_map_pages_buf() before complete_all(fw_buf-completion) and let all requests see the mapped 'buf-data' once the loading is completed. Signed-off-by: Ming Lei ming@canonical.com --- drivers/base

[PATCH 3/4] firmware loader: let direct loading back on 'firmware_buf'

2012-10-08 Thread Ming Lei
resume. Cc: Linus Torvalds torva...@linux-foundation.org Signed-off-by: Ming Lei ming@canonical.com --- drivers/base/firmware_class.c | 171 - 1 file changed, 100 insertions(+), 71 deletions(-) diff --git a/drivers/base/firmware_class.c b/drivers/base

[PATCH 4/4] firmware loader: sync firmware cache by async_synchronize_full_domain

2012-10-08 Thread Ming Lei
async.c has provided synchronization mechanism on async_schedule_*, so use async_synchronize_full_domain to sync caching firmware instead of reinventing the wheel. Signed-off-by: Ming Lei ming@canonical.com --- drivers/base/firmware_class.c | 34 ++ 1 file

Re: [PATCH] firmware: Don't attempt to allocate zero bytes with vmalloc()

2012-10-09 Thread Ming Lei
. That doesn't seem If so, I am wondering why the driver has to call request_firmware()? Looks just bypassing request_firmware() is fine for the driver, doesn't it? Thanks, -- Ming Lei -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord

Re: [PATCH] firmware: Don't attempt to allocate zero bytes with vmalloc()

2012-10-09 Thread Ming Lei
the driver always expects getting some bytes by calling request_firmware(). Thanks, -- Ming Lei -- 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: [PATCH] firmware: Don't attempt to allocate zero bytes with vmalloc()

2012-10-09 Thread Ming Lei
() is better for the case, _nowait() can avoid unnecessary delay and speedup firmware loading if there are more than one firmware to load. Thanks, -- Ming Lei -- 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

Re: [PATCH] firmware: Don't attempt to allocate zero bytes with vmalloc()

2012-10-09 Thread Ming Lei
On Tue, Oct 9, 2012 at 8:36 PM, Mark Brown broo...@opensource.wolfsonmicro.com wrote: On Tue, Oct 09, 2012 at 08:02:18PM +0800, Ming Lei wrote: If loading via user space, timeout or not depends on userspace, at least udev won't timeout on non-existent firmware image. This may be a mdev

Re: [PATCH 0/2] Expose firmware paths via procfs

2012-10-10 Thread Ming Lei
? Once I have some time I hope to also send out a patch that allows the user to dynamically configure these paths. IMO, kernel parameter should be an appropriate way to configure the path, and the way of /proc or /sys may be a bit late. Thanks, -- Ming Lei -- To unsubscribe from this list

Re: udev breakages - was: Re: Need of an .async_probe() type of callback at driver's core - Was: Re: [PATCH] [media] drxk: change it to use request_firmware_nowait()

2012-10-11 Thread Ming Lei
path will be added, so you use can pass your search path from kernel command too. Thanks, -- Ming Lei -- 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

[PATCH v1] firmware loader: introduce module parameter to customize fw search path

2012-10-25 Thread Ming Lei
when 'firmware_class' is built in kernel: firmware_class.path=$CUSTOMIZED_PATH [1], https://lkml.org/lkml/2012/10/11/337 Cc: Linus Torvalds torva...@linux-foundation.org Signed-off-by: Ming Lei ming@canonical.com --- V1: - remove kernel boot parameter and only support

Re: [PATCH v1] firmware loader: introduce module parameter to customize fw search path

2012-10-25 Thread Ming Lei
, /lib/firmware/updates, /lib/firmware/ UTS_RELEASE, /lib/firmware }; but in fact there isn't any warning with above change and it does work, still don't know why? :-( Thanks, -- Ming Lei -- To unsubscribe from this list: send the line unsubscribe linux

[PATCH v2] firmware loader: introduce module parameter to customize fw search path

2012-10-26 Thread Ming Lei
when 'firmware_class' is built in kernel: firmware_class.path=$CUSTOMIZED_PATH [1], https://lkml.org/lkml/2012/10/11/337 Cc: Linus Torvalds torva...@linux-foundation.org Signed-off-by: Ming Lei ming@canonical.com --- v2 - take a cleaner approach suggested by Linus

Re: [PATCH v2] firmware loader: introduce module parameter to customize fw search path

2012-10-26 Thread Ming Lei
On Fri, Oct 26, 2012 at 10:51 PM, Ming Lei ming@canonical.com wrote: + + /* skip the unset customized path */ + if (!fw_path[0]) There is one mistake above and should be below, sorry for the noise. if (!fw_path[i][0]) Thanks, -- Ming Lei

[PATCH v3] firmware loader: introduce module parameter to customize fw search path

2012-10-26 Thread Ming Lei
when 'firmware_class' is built in kernel: firmware_class.path=$CUSTOMIZED_PATH [1], https://lkml.org/lkml/2012/10/11/337 Cc: Linus Torvalds torva...@linux-foundation.org Signed-off-by: Ming Lei ming@canonical.com --- v3 - fix one mistake on checking unset firmware path v2

Re: [PATCH v3] firmware loader: introduce module parameter to customize fw search path

2012-10-27 Thread Ming Lei
. + * Typical usage is that passing 'firmware_class.path=$CUSTOMIZED_PATH' + * from kernel command because firmware_class is generally built in do you mean kernel command line? Yes. Thanks, -- Ming Lei -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body

Re: [PATCH] firmware: use noinline_for_stack

2012-10-28 Thread Ming Lei
On Sun, Oct 28, 2012 at 6:37 AM, Cesar Eduardo Barros ces...@cesarb.net wrote: The comment above fw_file_size() suggests it is noinline for stack size reasons. Use noinline_for_stack to make this more clear. Acked-by: Ming Lei ming@canonical.com Thanks, -- Ming Lei -- To unsubscribe from

[PATCH v3 0/6] solve deadlock caused by memory allocation with I/O

2012-10-29 Thread Ming Lei
+++ include/linux/sched.h| 10 + mm/page_alloc.c | 10 - mm/vmscan.c | 12 ++ net/core/net-sysfs.c |5 +++ 9 files changed, 152 insertions(+), 2 deletions(-) Thanks, -- Ming Lei -- To unsubscribe from this list: send the line

[PATCH v3 1/6] mm: teach mm by current context info to not do I/O during memory allocation

2012-10-29 Thread Ming Lei
: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com Cc: Michal Hocko mho...@suse.cz Cc: Ingo Molnar mi...@redhat.com Cc: Peter Zijlstra pet...@infradead.org Cc: Rafael J. Wysocki r...@sisk.pl Signed-off-by: Minchan Kim minc...@kernel.org Signed-off-by: Ming Lei ming@canonical.com --- v3

[PATCH v3 2/6] PM / Runtime: introduce pm_runtime_set[get]_memalloc_noio()

2012-10-29 Thread Ming Lei
device's error handling path (for example, usb device reset) Cc: Alan Stern st...@rowland.harvard.edu Cc: Rafael J. Wysocki r...@sisk.pl Signed-off-by: Ming Lei ming@canonical.com --- v3: - introduce pm_runtime_get_memalloc_noio() - hold one global lock

[PATCH v3 3/6] block/genhd.c: apply pm_runtime_set_memalloc_noio on block devices

2012-10-29 Thread Ming Lei
This patch applyes the introduced pm_runtime_set_memalloc_noio on block device so that PM core will teach mm to not allocate memory with GFP_IOFS when calling the runtime_resume callback for block devices. Cc: Jens Axboe ax...@kernel.dk Signed-off-by: Ming Lei ming@canonical.com --- block

[PATCH v3 4/6] net/core: apply pm_runtime_set_memalloc_noio on network devices

2012-10-29 Thread Ming Lei
Dumazet eric.duma...@gmail.com Cc: David Decotigny david.decoti...@google.com Cc: Tom Herbert therb...@google.com Cc: Ingo Molnar mi...@elte.hu Signed-off-by: Ming Lei ming@canonical.com --- net/core/net-sysfs.c |5 + 1 file changed, 5 insertions(+) diff --git a/net/core/net-sysfs.c b

[PATCH v3 5/6] PM / Runtime: force memory allocation with no I/O during runtime_resume callbcack

2012-10-29 Thread Ming Lei
. Wysocki r...@sisk.pl Signed-off-by: Ming Lei ming@canonical.com --- drivers/base/power/runtime.c | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/drivers/base/power/runtime.c b/drivers/base/power/runtime.c index 9fa6ea7..c9e26b9 100644 --- a/drivers/base/power

[PATCH v3 6/6] USB: forbid memory allocation with I/O during bus reset

2012-10-29 Thread Ming Lei
() and the storage interface can't do I/O transfer when the reset is triggered by other interface, or the error handling can't be completed if the reset is triggered by the storage itself(error handling path). Cc: Alan Stern st...@rowland.harvard.edu Cc: Oliver Neukum oneu...@suse.de Signed-off-by: Ming Lei ming

Re: [PATCH] firmware loader: Fix the concurrent request_firmware() race for kref_get/put

2012-11-09 Thread Ming Lei
loading support */ After fixing the patch style error, you can add my ack: Acked-by: Ming Lei ming@canonical.com Thanks, --- Ming Lei -- 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

Re: Kernel Firmware - Adding Right way??

2012-11-11 Thread Ming Lei
to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ Thanks, -- Ming Lei -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More

Re: Kernel Firmware - Adding Right way??

2012-11-11 Thread Ming Lei
with a couple of users. So, perhaps just manually adding the bnx2x. You can try to make bnx2x as module to see if you problem can be fixed, and probe deferral for loading firmware is still not ready. Thanks, -- Ming Lei -- To unsubscribe from this list: send the line unsubscribe linux-kernel

[PATCH v5 0/6] solve deadlock caused by memory allocation with I/O

2012-11-11 Thread Ming Lei
/linux/pm_runtime.h |3 ++ include/linux/sched.h| 22 ++ mm/page_alloc.c |9 - mm/vmscan.c |4 +- net/core/net-sysfs.c |5 +++ 9 files changed, 154 insertions(+), 5 deletions(-) Thanks, -- Ming Lei -- To unsubscribe from

[PATCH v5 1/6] mm: teach mm by current context info to not do I/O during memory allocation

2012-11-11 Thread Ming Lei
r...@sisk.pl Signed-off-by: Minchan Kim minc...@kernel.org Signed-off-by: Ming Lei ming@canonical.com --- v5: - use inline instead of macro to define memalloc_noio_* - replace memalloc_noio() with memalloc_noio_flags() to make code neater - don't clear GFP_FS

[PATCH v5 2/6] PM / Runtime: introduce pm_runtime_set_memalloc_noio()

2012-11-11 Thread Ming Lei
-by: Ming Lei ming@canonical.com --- v5: - fix code style error - add comment on clear the device memalloc_noio flag v4: - rename memalloc_noio_resume as memalloc_noio - remove pm_runtime_get_memalloc_noio() - add comments on pm_runtime_set_memalloc_noio v3

[PATCH v5 3/6] block/genhd.c: apply pm_runtime_set_memalloc_noio on block devices

2012-11-11 Thread Ming Lei
This patch applyes the introduced pm_runtime_set_memalloc_noio on block device so that PM core will teach mm to not allocate memory with GFP_IOFS when calling the runtime_resume and runtime_suspend callback for block devices and its ancestors. Cc: Jens Axboe ax...@kernel.dk Signed-off-by: Ming

[PATCH v5 4/6] net/core: apply pm_runtime_set_memalloc_noio on network devices

2012-11-11 Thread Ming Lei
...@davemloft.net Cc: Eric Dumazet eric.duma...@gmail.com Cc: David Decotigny david.decoti...@google.com Cc: Tom Herbert therb...@google.com Cc: Ingo Molnar mi...@elte.hu Signed-off-by: Ming Lei ming@canonical.com --- v4: - call pm_runtime_set_memalloc_noio(ddev, true) after device_add

[PATCH v5 5/6] PM / Runtime: force memory allocation with no I/O during Runtime PM callbcack

2012-11-11 Thread Ming Lei
: Rafael J. Wysocki r...@sisk.pl Signed-off-by: Ming Lei ming@canonical.com --- v5: - use inline memalloc_noio_save() v4: - runtime_suspend need this too because rpm_resume may wait for completion of concurrent runtime_suspend, so deadlock still may be triggered

[PATCH v5 6/6] USB: forbid memory allocation with I/O during bus reset

2012-11-11 Thread Ming Lei
() and the storage interface can't do I/O transfer when the reset is triggered by other interface, or the error handling can't be completed if the reset is triggered by the storage itself(error handling path). Cc: Alan Stern st...@rowland.harvard.edu Cc: Oliver Neukum oneu...@suse.de Signed-off-by: Ming Lei ming

Re: [PATCH v5 1/6] mm: teach mm by current context info to not do I/O during memory allocation

2012-11-11 Thread Ming Lei
On Sun, Nov 11, 2012 at 8:34 PM, Ming Lei ming@canonical.com wrote: +/* GFP_NOIO isn't allowed if PF_MEMALLOC_NOIO is set in current-flags */ +static inline gfp_t memalloc_noio_flags(gfp_t flags) +{ + if (unlikely(current-flags PF_MEMALLOC_NOIO)) + flags = ~GFP_NOIO

[PATCH v5 1/6] mm: teach mm by current context info to not do I/O during memory allocation

2012-11-11 Thread Ming Lei
r...@sisk.pl Signed-off-by: Minchan Kim minc...@kernel.org Signed-off-by: Ming Lei ming@canonical.com --- v5: - use inline instead of macro to define memalloc_noio_* - replace memalloc_noio() with memalloc_noio_flags() to make code neater - don't clear GFP_FS

[RFC PATCH 0/3] mm/PM/USB: force memory allocation with no io in need

2012-10-14 Thread Ming Lei
+ include/linux/usb.h |1 + mm/page_alloc.c |2 ++ Thanks, -- Ming Lei -- 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

[RFC PATCH 1/3] mm: teach mm by current context info to not do I/O during memory allocation

2012-10-14 Thread Ming Lei
Cc: Peter Zijlstra pet...@infradead.org Cc: Rafael J. Wysocki r...@sisk.pl Cc: linux-mm linux...@kvack.org Signed-off-by: Ming Lei ming@canonical.com --- include/linux/sched.h |5 + mm/page_alloc.c |2 ++ 2 files changed, 7 insertions(+) diff --git a/include/linux/sched.h b

  1   2   3   4   5   6   7   8   9   10   >