n
Cc: KAMEZAWA Hiroyuki
Cc: Michal Hocko
Cc: Ingo Molnar
Cc: Peter Zijlstra
Cc: "Rafael J. Wysocki"
Signed-off-by: Minchan Kim
Signed-off-by: Ming Lei
---
v3:
- no change
v2:
- remove changes on 'may_writepage' and 'may_swap' because that
d in block device's error handling path
(for example, usb device reset)
Cc: Alan Stern
Cc: "Rafael J. Wysocki"
Signed-off-by: Ming Lei
---
v3:
- introduce pm_runtime_get_memalloc_noio()
- hold one global lock on pm_runtime_set_memalloc_noio
- hold device
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
Signed-off-by: Ming Lei
---
block/genhd.c |8
1 file changed
c Dumazet
Cc: David Decotigny
Cc: Tom Herbert
Cc: Ingo Molnar
Signed-off-by: Ming Lei
---
net/core/net-sysfs.c |5 +
1 file changed, 5 insertions(+)
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c
index bcf02f6..9aba5be 100644
--- a/net/core/net-sysfs.c
+++ b/net/core/net-sy
This patch applies the introduced memalloc_noio_save() and
memalloc_noio_restore() to force memory allocation with no I/O
during runtime_resume callback on device which is marked as
memalloc_noio_resume.
Cc: Alan Stern
Cc: Oliver Neukum
Cc: Rafael J. Wysocki
Signed-off-by: Ming Lei
set() 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
Cc: Oliver Neukum
Signed-off-by: Ming Lei
---
v3:
- che
On Mon, Oct 29, 2012 at 11:41 PM, Alan Stern 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 avo
n add 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-inf
during
> usb_reset_device even when there's no runtime PM. Maybe the simplest
> answer is always to set noio 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_RUNT
On Wed, Oct 31, 2012 at 12:00 AM, Ming Lei 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
x27;root_wait' problem, see
prepare_namespace(): init/do_mounts.c, 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
On Wed, Oct 31, 2012 at 10:08 AM, Ming Lei 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,
ot;MAC address read from
> DTB\n");
> + return;
> + }
> + }
> +#endif
> +
> /* try reading mac address from EEPROM */
> if (smsc95xx_read_eeprom(dev, EEPROM_MAC_OFFSET, ETH_ALEN,
> dev->net-
lready and it is very easy to trigger
build problem, and introduce extra complexity to users at the same time.
About Dave's problem, I think distribution may not trigger it since
cpu microcode
should exist, so I am wondering if Dave can disable DELL_RBU to work around
the problem in his s
On Tue, Jul 9, 2013 at 1:33 PM, Takashi Iwai wrote:
> At Tue, 9 Jul 2013 11:15:20 +0800,
> Ming Lei wrote:
>>
>> On Mon, Jul 8, 2013 at 5:05 PM, Takashi Iwai wrote:
>> > At Sat, 6 Jul 2013 15:30:03 -0700,
>> > Greg KH wrote:
>> >>
>> >>
h means the user helper code has to be compiled in.
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/
On Tue, Jul 9, 2013 at 10:45 PM, Takashi Iwai wrote:
> At Tue, 9 Jul 2013 22:39:36 +0800,
> Ming Lei wrote:
>>
>> On Tue, Jul 9, 2013 at 9:32 PM, Takashi Iwai wrote:
>> > At Tue, 9 Jul 2013 16:43:30 +0800,
>> >> Actually from view of distribution, dell r
ks the description in help doc isn't consistent with what you wanted, :-)
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/
d/0x40
> [4.525567] [] __mutex_init+0x51/0x60
> [4.531017] [] bus_register+0x158/0x2c0
> [4.536646] [] edac_create_sysfs_mci_device+0x53/0x540
Looks because that bus_type of 'struct mem_ctl_info' is allocated dynamically
instead of being kept it in .data statically.
Thanks,
--
Ming Lei
--
s we didn't meet this case, do you have real examples?
>
> Signed-off-by: Neil Horman
> CC: Ming Lei
> CC: Greg Kroah-Hartman
> ---
> drivers/base/firmware_class.c | 38 +-
> 1 file changed, 25 insertions(+), 13 deletions(-)
&
On Wed, Sep 11, 2013 at 10:19 PM, Neil Horman wrote:
> On Wed, Sep 11, 2013 at 07:54:28PM +0800, Ming Lei wrote:
>> On Sat, Sep 7, 2013 at 3:36 AM, Neil Horman wrote:
>> > The direct firmware loading interface is a bit quiet about failures.
>> > Failures
>>
the filp_open on a firmware
> file
> fails, we continue the for loop through the list of available search paths.
> No
> error is generated in the case you describe above.
You are right, sorry for missing "if (IS_ERR(file)) continue;", and looks the
patch is good.
Acked-by
On Mon, Oct 7, 2013 at 1:31 AM, Dan Murphy wrote:
> On 10/06/2013 10:05 AM, Ming Lei wrote:
>> On Sat, Oct 5, 2013 at 2:25 AM, Dan Murphy wrote:
>>> If the smsc95xx does not have a valid MAC address stored within
>>> the eeprom then a random number is generated. The
ode.
>
> I will need to post V2 for that.
Your patch still doesn't deal with two smsc95xx devices built in
one board.
The problem is a generic one, looks it is better to do it when OF supports
discoverable bus.
Thanks,
--
Ming Lei
--
To unsubscribe from this list: send the line &quo
iscussions first before post your V2.
Below link is one I remembered, but I think you can find more:
https://lkml.org/lkml/2013/8/11/100
> This is all dependent on what the dev.id is of udev.
I am not sure why it depends on udev, and udev can't
see the device util it is added to system.
Th
nt,
> kobject_uevent(&fw_priv->dev.kobj, KOBJ_ADD);
> }
>
> - mutex_lock(&fw_lock);
> - list_add(&buf->pending_list, &pending_fw_head);
> - mutex_unlock(&fw_lock);
> -
> wait_for_completion(&buf->c
}
>
> device_unlock(dev);
> - if (dev->parent)
> - device_unlock(dev->parent);
> + if (parent)
> + device_unlock(parent);
>
> put_device(dev);
> - put_device(d
uch faster to fix existing drivers and much
> harder for a random device driver to get it wrong. We can even add
> helpers which manage dev->firmware, and free the relevant objects when
> needed, plus doing automatic ref/deref on probe/remove so that for a
As said above, ref/deref on p
e other big value apart from making it harder for driver writers to
> screw up is that it takes some of the control and puts it in one place.
> That means you can change it later easily not in each driver.
>
> This is enabling for device drivers. With no intention of offending
> driv
t; it should be devm_request_firmware() and use the mechanism we have ?
IMO, the kind of devm_request_firmware() mechanism may have its
disadvantage because the firmware in memory may or should be
released just after it has been downloaded into device, otherwise it will
consume memory unnecessarily to kee
On Fri, Sep 7, 2012 at 6:44 AM, Andrew Morton wrote:
> On Sat, 4 Aug 2012 12:01:27 +0800
> Ming Lei wrote:
>
>> This patch introduces the three helpers below:
>>
>> void device_cache_fw_images(void)
>> void device_uncache_fw_images(void)
>>
defined but not used
drivers/base/firmware_class.c:1212: warning:
'device_uncache_fw_images_delay' defined but not used
Reported-by: Andrew Morton
Signed-off-by: Ming Lei
---
drivers/base/firmware_class.c | 33 ++---
1 file changed,
On Fri, Sep 7, 2012 at 11:16 PM, Greg Kroah-Hartman
wrote:
> Can you send it to me in a format that I can apply it in?
OK, sent out, :-)
Thanks,
--
Ming Lei
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.ke
Hi,
This patchset implements asynchronous driver probe for driver_register,
and try to address the below problems about driver init during
kernel boot:
- help to solve some dependency problem during kernel boot
(such as, request_firmware is called inside probe when driver
i
Signed-off-by: Ming Lei
---
drivers/base/driver.c | 16 ++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/drivers/base/driver.c b/drivers/base/driver.c
index 9365076..67fb63c 100644
--- a/drivers/base/driver.c
+++ b/drivers/base/driver.c
@@ -15,6 +15,7
It should be correct to probe driver at the last minute in
driver_register since it will be so in !auto_probe case and
driver_register on no matched devices case.
Signed-off-by: Ming Lei
---
drivers/base/bus.c|5 -
drivers/base/driver.c |4
2 files changed, 4 insertions
This patch introduces driver_register_sync helper to make
driver's probe called synchronously inside driver_register
path.
platform_driver_probe should use driver_register_sync.
Signed-off-by: Ming Lei
---
drivers/base/driver.c |5 +++--
include/linux/device.h | 13 +++
platform_driver_probe supposes that the driver's probe is always called
inside platform_driver_probe, so apply driver_register_sync for it.
Signed-off-by: Ming Lei
---
drivers/base/platform.c | 11 +++
include/linux/platform_device.h | 12 +++-
2 files change
The check is not necessary since driver_attach should return 0
always.
Signed-off-by: Ming Lei
---
include/linux/device.h |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/device.h b/include/linux/device.h
index 7222c0b..dbb5efd 100644
--- a/include/linux
On Sun, Sep 9, 2012 at 10:57 AM, Greg Kroah-Hartman
wrote:
> On Sun, Sep 09, 2012 at 07:25:15AM +0800, Ming Lei wrote:
>> Hi,
>>
>> This patchset implements asynchronous driver probe for driver_register,
>> and try to address the below problems about driver
r *buf;
>
> size = fw_file_size(file);
> + if (size == 0) {
> + fw->data = NULL;
> + fw->size = 0;
> + return true;
> + }
Considered that zero-length firmware image doesn't make sense for drivers
(callers),
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,
--
Min
imizes 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
---
drivers/base/firmware
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
---
drivers/base/fir
y during system resume.
Cc: Linus Torvalds
Signed-off-by: Ming Lei
---
drivers/base/firmware_class.c | 171 -
1 file changed, 100 insertions(+), 71 deletions(-)
diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
index f288251..a095d
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
---
drivers/base/firmware_class.c | 34 ++
1 file changed, 6 insertions
t if that was the case. 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-kerne
zero length, because 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.ker
) 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.o
On Tue, Oct 9, 2012 at 8:36 PM, Mark Brown
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 md
;
> 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 l
sc.may_ should be handled in the same
> way.
Yes, alloc_page_buffers() and dma_alloc_from_contiguous may drop into
the path, so gfp flag should be changed in try_to_free_page() too.
Thanks,
--
Ming Lei
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel"
x27;, could you agree
on it?
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/
this handling too.
But I am wondering how you could get the pointer of device A for
releasing driver in device B's remove()?
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 major
.
Cc: Joerg Roedel
Cc: Shuah Khan
Cc: Paul Gortmaker
Cc: Andrew Morton
Cc: Jakub Kicinski
Signed-off-by: Ming Lei
---
lib/dma-debug.c |4
1 file changed, 4 insertions(+)
diff --git a/lib/dma-debug.c b/lib/dma-debug.c
index 94aa94e..be132f3 100644
--- a/lib/dma-debug.c
+++ b/li
Hi,
Below v1 should be more efficient and simper, sorry for the noise.
Thanks,
--
Ming Lei
--
>From d275d195794ff80e018145f2fae714b35ddc49e2 Mon Sep 17 00:00:00 2001
From: Ming Lei
Date: Thu, 18 Oct 2012 23:30:57 +0800
Subject: [PATCH v1] lib/dma-debug.c: fix __hash_bucket_find
If there
the problem.
> Re-tested it with and without patch and didn't see the warning with your
> patch.
>
> That said, this patch is malformed and didn't apply cleanly.
> You have my
>
> Tested-by: Shuah Khan
OK, I will submit it again for merge.
Thanks,
--
Ming Le
FP_IO
only happen in runtime resume/bus reset/block I/O transfer contexts
generally.
> adding a flag may be a better approach. I'm not sure ATM.
OK, I will prepare -v2 with the flag approach for review.
Thanks,
--
Ming Lei
--
To unsubscribe from this list: send the line "unsubscribe
.
Cc: Joerg Roedel
Cc: Shuah Khan
Cc: Paul Gortmaker
Cc: Andrew Morton
Cc: Jakub Kicinski
Cc: Fengguang Wu
Tested-by: Shuah Khan
Signed-off-by: Ming Lei
---
v1:
- initialize 'last_lvl' as -1 to simplify the fix
lib/dma-debug.c |4 ++--
1 file changed, 2 insertions(
be stored first.
>
> You could add __must_check to the function definition to ensure that
> all callers save its return value.
Yes, we can do that, but the function name is not better than _save
from readability.
Thanks,
--
Ming Lei
--
To unsubscribe from this list: send the line "un
On Tue, Oct 9, 2012 at 12:01 PM, Ming Lei 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
> ++
On Mon, Oct 22, 2012 at 12:14 AM, Greg Kroah-Hartman
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
--
To unsubscribe
| 12
net/core/net-sysfs.c |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://
n
Cc: KAMEZAWA Hiroyuki
Cc: Michal Hocko
Cc: Ingo Molnar
Cc: Peter Zijlstra
Cc: "Rafael J. Wysocki"
Signed-off-by: Minchan Kim
Signed-off-by: Ming Lei
---
v2:
- remove changes on 'may_writepage' and 'may_swap' because that
isn't related
ice 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"
Signed-off-by: Ming Lei
---
drivers/base/po
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
Signed-off-by: Ming Lei
---
block/genhd.c |8
1 file changed
c Dumazet
Cc: David Decotigny
Cc: Tom Herbert
Cc: Ingo Molnar
Signed-off-by: Ming Lei
---
net/core/net-sysfs.c |5 +
1 file changed, 5 insertions(+)
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c
index bcf02f6..9aba5be 100644
--- a/net/core/net-sysfs.c
+++ b/net/core/net-sy
This patch applies the introduced memalloc_noio_save() and
memalloc_noio_restore() to force memory allocation with no I/O
during runtime_resume callback on device which is marked as
memalloc_noio_resume.
Cc: Alan Stern
Cc: Oliver Neukum
Cc: Rafael J. Wysocki
Signed-off-by: Ming Lei
set() 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
Cc: Oliver Neukum
Signed-off-by: Ming Lei
---
driver
f probe.
Could you test kernel 3.6 or the latest kernel to see if the problem can be
reproduced?
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.
27;s lock has to be held in this patch.
> What am I missing?
Your concern on device_remove() might be correct. Also, I am wondering
if we can walk the 'dpm_list' backwards for device shutdown, which should
be simpler and more reasonable.
Thanks,
--
Ming Lei
--
To unsubscribe from
rds for device shutdown, which should
>> be simpler and more reasonable.
>
> How would that help?
device_pm_lock() can prevent device_move() from being running.
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/
On Fri, Dec 7, 2012 at 11:25 PM, Alan Stern wrote:
> On Fri, 7 Dec 2012, Ming Lei wrote:
>> device_pm_lock() can prevent device_move() from being running.
>
> That wouldn't prevent problems during unbinding. Wedson is right; the
Right.
> places that lock dev->parent
r 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-kerne
+
The above might be wrong if the firmware file doesn't exist in default
search paths. You should skip 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.
>
s.sig", fw_path[i],
> buf->fw_id);
> + if (verify_signature(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.
T
On Tue, Nov 6, 2012 at 3:32 PM, Takashi Iwai wrote:
> At Tue, 6 Nov 2012 15:16:43 +0800,
> Ming Lei wrote:
>>
>> On Tue, Nov 6, 2012 at 3:03 PM, Takashi Iwai wrote:
>> >
>> > Yeah, it's just uncovered in the patch. As a easy solution, apply the
>
o distro releases using 3.7-rc since it's still rc.
> But what's your point?
I mean direct loading hasn't been tested completely, so we don't
know which distributions may fallback on user space loading.
Thanks,
--
Ming Lei
--
To unsubscribe from this list: send the line "unsubscr
On Tue, Nov 6, 2012 at 6:17 PM, Takashi Iwai wrote:
> At Tue, 6 Nov 2012 18:04:36 +0800,
> Ming Lei wrote:
>>
>> On Tue, Nov 6, 2012 at 4:18 PM, Takashi Iwai wrote:
>> >
>> > Right, and it's intentionally dropped so. For the non-default fw
>> >
age.
>
> Debug messages are turned off 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
jobctl flags
>> */
>>
>> ...
>>
>> @@ -2304,6 +2304,12 @@ unsigned long try_to_free_pages(struct zonelist
>> *zonelist, int order,
>> .gfp_mask = sc.gfp_mask,
>> };
>>
>> + if (unlikely(memalloc_noio())) {
>> +
hild(dev, NULL,
>> +dev_memalloc_noio)))
>> + break;
>> + }
>> + mutex_unlock(&dev_hotplug_mutex);
>> +}
>> +EXPORT_SYMBOL_GPL(pm_runtime_set_memalloc_noio);
Thanks,
--
Ming Lei
--
To unsubscribe from thi
On Wed, Nov 7, 2012 at 7:23 AM, Andrew Morton 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 "unsubscribe li
= b1,
> };
>
> should not be turned into
>
> struct foo bar {
> .a = a1,
> };
>
> bar.b = b1;
>
> and we don't want to do
>
> struct foo bar { };
>
> bar.a = a1;
> bar.b = b1;
&
(test_bit(FW_STATUS_DONE, &(fw_priv->buf->status))) {
> + mutex_unlock(&fw_lock);
> + return;
> + }
> + mutex_unlock(&fw_lock);
> +
> fw_load_abort(fw_priv);
> }
Also the lock of 'fw_lock' should be held when setting
if (timeout != MAX_SCHEDULE_TIMEOUT)
> - mod_timer(&fw_priv->timeout,
> - round_jiffies_up(jiffies + timeout));
> + schedule_delayed_work(&fw_priv->timeout_work,
> +
calling fw_load_abort() in timeout function.
>
> As Ming's proposal, we need change the timer into sched_work to
> benefit from using &fw_lock mutex also.
>
> Signed-off-by: liu chuansheng
Acked-by: Ming Lei
Thanks,
--
Ming Lei
--
To unsubscribe from this list: send the li
struct firmware_cache *fwc = buf->fwc;
> + spin_lock(&fwc->lock);
> + if(!kref_put(&buf->ref, __fw_free_buf))
$./scripts/checkpatch.pl
ERROR: space required before the open parenthesis '('
#97: FILE: drivers/base/firmware_class.c:267:
+ if(!kref_put
Seti Units Returned: 19,471
> Processing time: 32 years, 290 days, 12 hours, 58 minutes
> (Total Hours: 287,489)
>
> BOINC@HOME CREDITS
> SETI13233290.532525 | EINSTEIN 9012033.029852
> ROSETTA 5329761.808862 | ABC 15417521.047462
>
>
>
> Don't write the drivers, so don't know if this is an option. I've only
> heard of this issue with the bnx2x driver with HP servers and only
> with a couple of users. So, perhaps just manually adding the
> bnx2x.
You can try to make bnx2x as module to see if
++
include/linux/pm.h |1 +
include/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 deletion
h(call tree) may allocate memory
with GFP_KERNEL.
Cc: Alan Stern
Cc: Oliver Neukum
Cc: Jiri Kosina
Cc: Andrew Morton
Cc: Mel Gorman
Cc: KAMEZAWA Hiroyuki
Cc: Michal Hocko
Cc: Ingo Molnar
Cc: Peter Zijlstra
Cc: "Rafael J. Wysocki"
Signed-off-by: Minchan Kim
Signed-off-by: Ming Lei
device 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 in the path recursively.
Cc: Alan Stern
Cc: "Rafael J. Wysocki"
Signed-off-by: Ming Lei
---
v5
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
Signed-off-by: Ming Lei
---
v5
ller"
Cc: Eric Dumazet
Cc: David Decotigny
Cc: Tom Herbert
Cc: Ingo Molnar
Signed-off-by: Ming Lei
---
v4:
- call pm_runtime_set_memalloc_noio(ddev, true) after
device_add
---
net/core/net-sysfs.c |5 +
1 file changed, 5 insertions(+)
diff --git a/net/core/net-sy
This patch applies the introduced memalloc_noio_save() and
memalloc_noio_restore() to force memory allocation with no I/O
during runtime_resume/runtime_suspend callback on device with
the flag of 'memalloc_noio' set.
Cc: Alan Stern
Cc: Oliver Neukum
Cc: Rafael J. Wysocki
Signed-of
set() 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
Cc: Oliver Neukum
Signed-off-by: Ming Lei
---
v
On Sun, Nov 11, 2012 at 8:34 PM, Ming Lei 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))
> +
h(call tree) may allocate memory
with GFP_KERNEL.
Cc: Alan Stern
Cc: Oliver Neukum
Cc: Jiri Kosina
Cc: Andrew Morton
Cc: Mel Gorman
Cc: KAMEZAWA Hiroyuki
Cc: Michal Hocko
Cc: Ingo Molnar
Cc: Peter Zijlstra
Cc: "Rafael J. Wysocki"
Signed-off-by: Minchan Kim
Signed-off-by: Ming Lei
m_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, 152 insertions(+), 4 deletions(-)
Thanks,
--
Ming Lei
--
To unsubscribe from this list: send the
101 - 200 of 2944 matches
Mail list logo