Re: [PATCH V6] UBI: Extend UBI layer debug/messaging capabilities

2014-12-29 Thread Tanya Brokhman
Hi Hu, On 12/29/2014 5:14 AM, hujianyang wrote: On 2014/11/3 21:58, Tanya Brokhman wrote: If there is more then one UBI device mounted, there is no way to distinguish between messages from different UBI devices. Add device number to all ubi layer message types. The R/O block driver messages

Re: [PATCH 3/6] UBI: Fastmap: Notify user in case of an ubi_update_fastmap() failure

2014-12-08 Thread Tanya Brokhman
On 12/8/2014 11:11 AM, Richard Weinberger wrote: Hi! Am 08.12.2014 um 07:58 schrieb Tanya Brokhman: On 12/7/2014 4:22 PM, Richard Weinberger wrote: Am 07.12.2014 um 14:59 schrieb Tanya Brokhman: Hi Richard, On 11/30/2014 1:35 PM, Richard Weinberger wrote: If ubi_update_fastmap() fails

Re: [PATCH 2/6] UBI: Fastmap: Don't allocate new ubi_wl_entry objects

2014-12-08 Thread Tanya Brokhman
On 12/8/2014 11:14 AM, Richard Weinberger wrote: Am 08.12.2014 um 09:36 schrieb Tanya Brokhman: On 11/30/2014 1:35 PM, Richard Weinberger wrote: There is no need to allocate new ones every time, we can reuse the existing ones. This makes the code cleaner and more easy to follow. Signed-off-by

Re: [PATCH 2/6] UBI: Fastmap: Don't allocate new ubi_wl_entry objects

2014-12-08 Thread Tanya Brokhman
; - } - } - old_fm = ubi->fm; ubi->fm = NULL; Thanks, Tanya Brokhman -- Qualcomm Israel, on behalf of Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Pro

Re: [PATCH 3/6] UBI: Fastmap: Notify user in case of an ubi_update_fastmap() failure

2014-12-07 Thread Tanya Brokhman
On 12/7/2014 4:22 PM, Richard Weinberger wrote: Am 07.12.2014 um 14:59 schrieb Tanya Brokhman: Hi Richard, On 11/30/2014 1:35 PM, Richard Weinberger wrote: If ubi_update_fastmap() fails notify the user. This is not a hard error as ubi_update_fastmap() makes sure that upon failure the current

Re: [PATCH 5/6] UBI: Fastmap: Fix fastmap usage in ubi_volume_notify()

2014-12-07 Thread Tanya Brokhman
On 11/30/2014 1:35 PM, Richard Weinberger wrote: There is no need to switch to ro mode if ubi_update_fastmap() fails. Also get rid of the ifdef. Signed-off-by: Richard Weinberger Reviewed-by: Tanya Brokhman --- drivers/mtd/ubi/build.c | 11 +-- 1 file changed, 5 insertions

Re: [PATCH 4/6] UBI: Fastmap: Wrap fastmap specific function in a ifdef

2014-12-07 Thread Tanya Brokhman
On 11/30/2014 1:35 PM, Richard Weinberger wrote: ...such that we can implement NOP variants of some functions. This will help to reduce fastmap specific ifdefs in other c files. Signed-off-by: Richard Weinberger Reviewed-by: Tanya Brokhman --- drivers/mtd/ubi/ubi.h | 4 1 file

Re: [PATCH 3/6] UBI: Fastmap: Notify user in case of an ubi_update_fastmap() failure

2014-12-07 Thread Tanya Brokhman
bi_msg but against "return -ENOSPC;" + } spin_lock(&ubi->wl_lock); } Thanks, Tanya Brokhman -- Qualcomm Israel, on behalf of Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Coll

Re: [PATCH 2/6] UBI: Fastmap: Don't allocate new ubi_wl_entry objects

2014-12-07 Thread Tanya Brokhman
On 11/30/2014 1:35 PM, Richard Weinberger wrote: There is no need to allocate new ones every time, we can reuse the existing ones. This makes the code cleaner and more easy to follow. Signed-off-by: Richard Weinberger Reviewed-by: Tanya Brokhman --- drivers/mtd/ubi/fastmap.c | 31

Re: [PATCH 1/6] UBI: Fastmap: Fix memory leaks while closing the WL sub-system

2014-12-07 Thread Tanya Brokhman
On 12/7/2014 1:34 PM, Richard Weinberger wrote: Am 07.12.2014 um 12:32 schrieb Tanya Brokhman: On 12/7/2014 11:54 AM, Richard Weinberger wrote: Am 07.12.2014 um 09:13 schrieb Tanya Brokhman: On 11/30/2014 1:35 PM, Richard Weinberger wrote: Add a ubi_fastmap_close() to free all resources used

Re: [PATCH 1/6] UBI: Fastmap: Fix memory leaks while closing the WL sub-system

2014-12-07 Thread Tanya Brokhman
On 12/7/2014 11:54 AM, Richard Weinberger wrote: Am 07.12.2014 um 09:13 schrieb Tanya Brokhman: On 11/30/2014 1:35 PM, Richard Weinberger wrote: Add a ubi_fastmap_close() to free all resources used by fastmap at WL shutdown. Signed-off-by: Richard Weinberger --- drivers/mtd/ubi/wl.c | 21

Re: [PATCH 1/6] UBI: Fastmap: Fix memory leaks while closing the WL sub-system

2014-12-07 Thread Tanya Brokhman
i) void ubi_wl_close(struct ubi_device *ubi) { dbg_wl("close the WL sub-system"); -#ifdef CONFIG_MTD_UBI_FASTMAP - flush_work(&ubi->fm_work); -#endif + ubi_fastmap_close(ubi); shutdown_work(ubi); protection_queue_destroy(ubi); tree_dest

Re: [PATCH 6/6] UBI: Fastmap: Make ubi_refill_pools() fair

2014-12-06 Thread Tanya Brokhman
e. We want a PEB to be used for wear-leveling not for "end users" like UBIFS. sorry, my mistake. I meant wl_get_wle() (the new function). the only diff between wl_get_wle() and the above is that you use find_wl_entry() and wl_get_wle() uses find_mean_wl_entry() and takes the anchor into

Re: [PATCH 4/6] UBI: Fastmap: Fix races in ubi_wl_get_peb()

2014-12-06 Thread Tanya Brokhman
;s why the "retry" bugs me a bit. You mean a cond_resched()? This retry-logic is common pattern in UBI. For exmaple see ubi_wl_put_peb(). you're right. didn't pay much attention to ubi_wl_put_peb() before. don't like it there either :) perhaps we can rethink this

Re: [PATCH 6/6] UBI: Fastmap: Make ubi_refill_pools() fair

2014-12-05 Thread Tanya Brokhman
enough++; + + if (enough == 2) break; } + + wl_pool->used = 0; pool->used = 0; -} -/** - * ubi_refill_pools - refills all fastmap PEB pools. - * @ubi: UBI device description object - */ -void ubi_refill_pools(struct ubi

Re: [PATCH 5/6] UBI: Split __wl_get_peb()

2014-12-05 Thread Tanya Brokhman
@@ -704,7 +719,7 @@ int ubi_wl_get_peb(struct ubi_device *ubi) int peb, err; spin_lock(&ubi->wl_lock); - peb = __wl_get_peb(ubi); + peb = wl_get_peb(ubi); spin_unlock(&ubi->wl_lock); if (peb < 0) Thanks, Tanya Brokhman -- Qualcomm Israel,

Re: [PATCH 4/6] UBI: Fastmap: Fix races in ubi_wl_get_peb()

2014-12-05 Thread Tanya Brokhman
Hi Richard On 12/5/2014 3:20 PM, Richard Weinberger wrote: Tanya, Am 05.12.2014 um 14:09 schrieb Tanya Brokhman: On 11/24/2014 3:20 PM, Richard Weinberger wrote: ubi_wl_get_peb() has two problems, it reads the pool size and usage counters without any protection. While reading one value would

Re: [PATCH 4/6] UBI: Fastmap: Fix races in ubi_wl_get_peb()

2014-12-05 Thread Tanya Brokhman
7 +671,7 @@ static struct ubi_wl_entry *get_peb_for_wl(struct ubi_device *ubi) struct ubi_fm_pool *pool = &ubi->fm_wl_pool; int pnum; - if (pool->used == pool->size || !pool->size) { + if (pool->used == pool->size) { /* We cann

Re: [PATCH 3/6] UBI: Fastmap: Ensure that all fastmap work is done upon WL shutdown

2014-12-04 Thread Tanya Brokhman
. I am missing explanations why I am wrong... __ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ Thanks, Tanya Brokhman -- Qualcomm Israel, on behalf of Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum

Re: [PATCH 2/6] UBI: Fastmap: Ensure that only one fastmap work is scheduled

2014-12-04 Thread Tanya Brokhman
bitflips are detected. Reviewed-by: Tanya Brokhman Signed-off-by: Richard Weinberger --- drivers/mtd/ubi/ubi.h | 4 +++- drivers/mtd/ubi/wl.c | 8 +++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/ubi/ubi.h b/drivers/mtd/ubi/ubi.h index f80ffab..04c4c05

Re: [PATCH 02/35] UBI: Fix stale pointers in ubi->lookuptbl

2014-12-04 Thread Tanya Brokhman
On 12/4/2014 1:04 PM, Richard Weinberger wrote: Tanya, Am 04.12.2014 um 12:00 schrieb Tanya Brokhman: Hi Richard On 10/29/2014 2:45 PM, Richard Weinberger wrote: In some error paths the WL sub-system gives up on a PEB and frees it's ubi_wl_entry struct but does not set the entry i

Re: [PATCH 02/35] UBI: Fix stale pointers in ubi->lookuptbl

2014-12-04 Thread Tanya Brokhman
i->lookuptbl[e2->pnum] = NULL there on purpose. Thanks, Tanya Brokhman -- Qualcomm Israel, on behalf of Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project -- To unsubscribe from this list:

Re: [PATCH 01/35] UBI: Add initial support for fastmap self checks

2014-12-04 Thread Tanya Brokhman
On 10/29/2014 2:45 PM, Richard Weinberger wrote: Using this debugfs knob fastmap self checks can be controlled. Reviewed-by: Tanya Brokhman Signed-off-by: Richard Weinberger --- drivers/mtd/ubi/debug.c | 11 +++ drivers/mtd/ubi/debug.h | 5 + drivers/mtd/ubi/ubi.h | 4

Re: [PATCH V6] UBI: Extend UBI layer debug/messaging capabilities

2014-11-11 Thread Tanya Brokhman
On 11/10/2014 7:57 PM, Joe Perches wrote: On Mon, 2014-11-10 at 18:37 +0100, Richard Weinberger wrote: Am 03.11.2014 um 14:58 schrieb Tanya Brokhman: If there is more then one UBI device mounted, there is no way to distinguish between messages from different UBI devices. Add device number to

Re: [PATCH] UBI: Extend UBI layer debug/messaging capabilities - cosmetics

2014-11-10 Thread Tanya Brokhman
On 11/10/2014 2:18 PM, Artem Bityutskiy wrote: On Sun, 2014-11-09 at 13:06 +0200, Tanya Brokhman wrote: /* Normal UBI messages */ #define ubi_msg(ubi, fmt, ...) pr_notice("UBI-%d: %s:" fmt "\n", \ -ubi->ubi_num,

[PATCH] UBI: Extend UBI layer debug/messaging capabilities - cosmetics

2014-11-09 Thread Tanya Brokhman
Some cosmetic fixes to the patch "UBI: Extend UBI layer debug/messaging capabilities". Signed-off-by: Tanya Brokhman --- Changes from original patch: - Added ptr verification @ ubi_err/ubi_msg/ubi_warn Removed extra printing of ubi number Removed new messages.

Re: [PATCH V6] UBI: Extend UBI layer debug/messaging capabilities

2014-11-07 Thread Tanya Brokhman
On 11/7/2014 12:08 PM, hujianyang wrote: On 2014/11/5 23:35, Artem Bityutskiy wrote: On Mon, 2014-11-03 at 15:58 +0200, Tanya Brokhman wrote: If there is more then one UBI device mounted, there is no way to distinguish between messages from different UBI devices. Add device number to all ubi

[PATCH V6] UBI: Extend UBI layer debug/messaging capabilities

2014-11-03 Thread Tanya Brokhman
. Signed-off-by: Tanya Brokhman Signed-off-by: Artem Bityutskiy --- Changes from V1: - Compilation error fixed - macros were updated to receive the ubi structure as parameter and not just ubi_number - Places in code, where ubi-messaging macros were used, but

Re: [PATCH V5] mtd: ubi: Extend UBI layer debug/messaging capabilities

2014-11-02 Thread Tanya Brokhman
On 11/3/2014 5:08 AM, hujianyang wrote: Hi Tanya, On 2014/11/3 1:14, Tanya Brokhman wrote: This patch add 'struct ubi_device *' for 3 functions. We can get 'ubi_device' from 'ubi_volume'. So I think it's because when we call these functions, the &#x

Re: [PATCH V5] mtd: ubi: Extend UBI layer debug/messaging capabilities

2014-11-02 Thread Tanya Brokhman
try_to_freeze()) continue; Here are two new adding messages. Maybe a separate patch is better? Just a suggestion. Done. @@ -1415,8 +1418,9 @@ int ubi_self_check_all_ff(struct ubi_device *ubi, int pnum, int offset, int len) return 0; fail: - ubi_er

Re: [PATCH V5] mtd: ubi: Extend UBI layer debug/messaging capabilities

2014-10-30 Thread Tanya Brokhman
On 10/30/2014 10:40 AM, Artem Bityutskiy wrote: Yeah, lets' correct this too. Thanks for ferview Hujianyang! Tanya, would you send a follow-up patch these? Yes, sure. Sorry, was pulled into some urgent stuff. Will post a new patch early next week. Artem. Thanks, Tanya Bro

[RFC/PATCH/RESEND 2/5 v2] mtd: ubi: Fill read disturb statistics

2014-10-26 Thread Tanya Brokhman
. Signed-off-by: Dolev Raviv Signed-off-by: Tanya Brokhman --- drivers/mtd/ubi/attach.c | 137 +++--- drivers/mtd/ubi/debug.c | 11 drivers/mtd/ubi/fastmap.c | 118 ++- drivers/mtd/ubi/io.c | 28

[RFC/PATCH/RESEND 4/5 v2] mtd: ubi: Read threshold verification

2014-10-26 Thread Tanya Brokhman
ubi->scrub list. Signed-off-by: Tanya Brokhman --- drivers/mtd/ubi/eba.c | 7 ++- drivers/mtd/ubi/wl.c | 56 +-- 2 files changed, 56 insertions(+), 7 deletions(-) diff --git a/drivers/mtd/ubi/eba.c b/drivers/mtd/ubi/eba.c index 0e116

[RFC/PATCH/RESEND 3/5 v2] mtd: ubi: Make in_wl_tree function public

2014-10-26 Thread Tanya Brokhman
Make the in_wl_tree function public to be used outside of wl.c. Rename it to ubi_in_wl_tree. Signed-off-by: Tanya Brokhman --- drivers/mtd/ubi/ubi.h | 1 + drivers/mtd/ubi/wl.c | 18 +- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/drivers/mtd/ubi/ubi.h b

[RFC/PATCH/RESEND 5/5 v2] mtd: ubi: Add sysfs entry to force all pebs' scan

2014-10-26 Thread Tanya Brokhman
Signed-off-by: Tanya Brokhman --- drivers/mtd/ubi/build.c | 32 +-- drivers/mtd/ubi/ubi.h | 3 + drivers/mtd/ubi/wl.c| 143 +++- 3 files changed, 171 insertions(+), 7 deletions(-) diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi

[RFC/PATCH 1/5 v2] mtd: ubi: Read disturb infrastructure

2014-10-26 Thread Tanya Brokhman
statistics Signed-off-by: Tanya Brokhman --- Changes from V1: - Documentation file was added Documentation/mtd/ubi/ubi-read-disturb.txt | 145 + drivers/mtd/ubi/build.c| 57 drivers/mtd/ubi/fastmap.c | 14 ++- drivers

Re: [PATCH V5] mtd: ubi: Extend UBI layer debug/messaging capabilities

2014-10-21 Thread Tanya Brokhman
On 10/21/2014 10:56 AM, Artem Bityutskiy wrote: On Mon, 2014-10-20 at 19:57 +0300, Tanya Brokhman wrote: If there is more then one UBI device mounted, there is no way to distinguish between messages from different UBI devices. Add device number to all ubi layer message types. The R/O block

[PATCH V5] mtd: ubi: Extend UBI layer debug/messaging capabilities

2014-10-20 Thread Tanya Brokhman
If there is more then one UBI device mounted, there is no way to distinguish between messages from different UBI devices. Add device number to all ubi layer message types. The R/O block driver messages were replaced by pr_* since ubi_device structure is not used by it. Signed-off-by: Tanya

Re: [PATCH v4] mtd: ubi: Extend UBI layer debug/messaging capabilities

2014-10-20 Thread Tanya Brokhman
em insists on it. Thanks, Tanya Brokhman -- Qualcomm Israel, on behalf of Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project -- To unsubscribe from this list: send the line "unsubscribe linux-kerne

Re: [PATCH v4] mtd: ubi: Extend UBI layer debug/messaging capabilities

2014-10-14 Thread Tanya Brokhman
On 10/14/2014 5:13 PM, Tanya Brokhman wrote: If there is more then one UBI device mounted, there is no way to distinguish between messages from different UBI devices. Add device number to all ubi layer message types. The R/O block driver messages were replaced by pr_* since ubi_device structure

[PATCH v4] mtd: ubi: Extend UBI layer debug/messaging capabilities

2014-10-14 Thread Tanya Brokhman
If there is more then one UBI device mounted, there is no way to distinguish between messages from different UBI devices. Add device number to all ubi layer message types. The R/O block driver messages were replaced by pr_* since ubi_device structure is not used by it. Signed-off-by: Tanya

Re: [PATCH 3/4] UBI: Fastmap: Care about the protection queue

2014-10-14 Thread Tanya Brokhman
On 10/14/2014 4:02 PM, Artem Bityutskiy wrote: On Tue, 2014-10-14 at 15:21 +0300, Tanya Brokhman wrote: Hi Artem/Richard I think your discussion here stopped being relevant to this specific patch but went on to the fastmap feature design in general :) This patch fixes a real bug in the current

Re: [PATCH 3/4] UBI: Fastmap: Care about the protection queue

2014-10-14 Thread Tanya Brokhman
erhaps this one can be merged and will be "fixed" later on when you agree on how you would like FM to access WL data structures in general? Thanks, Tanya Brokhman -- Qualcomm Israel, on behalf of Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member o

Re: [PATCH v3] mtd: ubi: Extend UBI layer debug/messaging capabilities

2014-10-14 Thread Tanya Brokhman
On 10/13/2014 6:59 PM, Artem Bityutskiy wrote: On Mon, 2014-10-13 at 18:37 +0300, Artem Bityutskiy wrote: On Mon, 2014-10-06 at 14:01 +0300, Tanya Brokhman wrote: If there is more then one UBI device mounted, there is no way to distinguish between messages from different UBI devices. Add

[PATCH v3] mtd: ubi: Extend UBI layer debug/messaging capabilities

2014-10-06 Thread Tanya Brokhman
If there is more then one UBI device mounted, there is no way to distinguish between messages from different UBI devices. Add device number to all ubi layer message types. Signed-off-by: Tanya Brokhman --- Changes from V1: - Compilation error fixed - macros were updated to

Re: [PATCH 4/4] UBI: Fastmap: Ensure that only one fastmap work is scheduled

2014-10-02 Thread Tanya Brokhman
On 9/30/2014 10:44 AM, Richard Weinberger wrote: Am 30.09.2014 09:39, schrieb Bityutskiy, Artem: On Tue, 2014-09-30 at 08:59 +0200, Richard Weinberger wrote: Am 30.09.2014 08:45, schrieb Bityutskiy, Artem: On Tue, 2014-09-30 at 00:20 +0200, Richard Weinberger wrote: + spin_lock(&ubi->wl

Re: [PATCH 3/4] UBI: Fastmap: Care about the protection queue

2014-10-02 Thread Tanya Brokhman
On 10/2/2014 4:32 PM, Richard Weinberger wrote: Am 02.10.2014 15:28, schrieb Tanya Brokhman: Hi Richard On 9/30/2014 1:20 AM, Richard Weinberger wrote: Fastmap can miss a PEB if it is in the protection queue and not jet in the used tree. Treat every protected PEB as used. Signed-off-by

Re: [RFC/PATCH 1/5] mtd: ubi: Read disturb infrastructure

2014-10-02 Thread Tanya Brokhman
On 10/2/2014 4:36 PM, Richard Weinberger wrote: Am 02.10.2014 14:50, schrieb Tanya Brokhman: Hi Richard, Sorry it took me some time to answer, got per-occupied with some urgent staff. On 9/28/2014 1:54 PM, Richard Weinberger wrote: Am 28.09.2014 12:46, schrieb Tanya Brokhman: On 9/28/2014

Re: [PATCH 2/4] UBI: Fastmap: Calc fastmap size correctly

2014-10-02 Thread Tanya Brokhman
) + \ sizeof(struct ubi_fm_scan_pool) + \ sizeof(struct ubi_fm_scan_pool) + \ (ubi->peb_count * sizeof(struct ubi_fm_ec)) + \ Reviewed-by: Tanya Brokhman -- Employee of Qualcomm Innovation Center, Inc. Qualcomm Innovation Center, Inc. is a member of Code Aur

Re: [RFC/PATCH 1/5] mtd: ubi: Read disturb infrastructure

2014-10-02 Thread Tanya Brokhman
On 10/2/2014 4:24 PM, Richard Weinberger wrote: Am 02.10.2014 14:50, schrieb Tanya Brokhman: Consider the case where you have a board with a fastmap enabled bootloader and a Linux OS. The bootloader does a fastmap attach and boots the kernel from UBI and the kernel it self has the rootfs on

Re: [PATCH 3/4] UBI: Fastmap: Care about the protection queue

2014-10-02 Thread Tanya Brokhman
ith this addition or does it needs updating as well? + } + } fmh->used_peb_count = cpu_to_be32(used_peb_count); for (node = rb_first(&ubi->scrub); node; node = rb_next(node)) { Thanks Tanya Brokhman -- Employee of Qualcomm Innovation Center, Inc. Qua

Re: [PATCH 2/4] UBI: Fastmap: Calc fastmap size correctly

2014-10-02 Thread Tanya Brokhman
bit more on the commit message. Thanks, Tanya Brokhman -- Employee of Qualcomm Innovation Center, Inc. Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the bo

Re: [PATCH 1/4] UBI: Ensure that all fastmap work is done upon WL shutdown

2014-10-02 Thread Tanya Brokhman
); +#ifdef CONFIG_MTD_UBI_FASTMAP + flush_work(&ubi->fm_work); flush_work returns bool. It might be useful to print that value for debugging. +#endif cancel_pending(ubi); protection_queue_destroy(ubi); tree_destroy(&ubi->used); Thanks Tanya Brokhman

Re: [RFC/PATCH 1/5] mtd: ubi: Read disturb infrastructure

2014-10-02 Thread Tanya Brokhman
Hi Richard, Sorry it took me some time to answer, got per-occupied with some urgent staff. On 9/28/2014 1:54 PM, Richard Weinberger wrote: Am 28.09.2014 12:46, schrieb Tanya Brokhman: On 9/28/2014 11:54 AM, Richard Weinberger wrote: Am 28.09.2014 10:48, schrieb Tanya Brokhman: @@ -424,6

[PATCH v2] mtd: ubi: Extend UBI layer debug/messaging capabilities

2014-09-30 Thread Tanya Brokhman
If there is more then one UBI device mounted, there is no way to distinguish between messages from different UBI devices. Add device number to all ubi layer message types. Signed-off-by: Tanya Brokhman --- Changes from V1: - Compilation error fixed - macros were updated to

Re: [PATCH] mtd: ubi: Extend UBI layer debug/messaging capabilities

2014-09-30 Thread Tanya Brokhman
On 9/28/2014 3:01 PM, Artem Bityutskiy wrote: On Sun, 2014-09-28 at 09:36 +0300, Tanya Brokhman wrote: If there is more then one UBI device mounted, there is no way to distinguish between messages from different UBI devices. Add device number to all ubi layer message types. Hi, the goal looks

Re: [PATCH] mtd: ubi: Extend UBI layer debug/messaging capabilities

2014-09-30 Thread Tanya Brokhman
On 9/29/2014 3:37 PM, Richard Weinberger wrote: Am 29.09.2014 14:32, schrieb Kiran Padwal: On Monday 29 September 2014 05:31 PM, Richard Weinberger wrote: Am 29.09.2014 12:50, schrieb Kiran Padwal: Hi Tanya, On Sunday 28 September 2014 12:06 PM, Tanya Brokhman wrote: If there is more then

Re: [RFC/PATCH 1/5] mtd: ubi: Read disturb infrastructure

2014-09-28 Thread Tanya Brokhman
Hi Jeremiah, On 9/28/2014 9:13 PM, Jeremiah Mahler wrote: Tanya, On Sun, Sep 28, 2014 at 09:37:00AM +0300, Tanya Brokhman wrote: The need for performing read disturb is determined according to new statistics collected per eraseblock: - read counter: incremented at each read operation

Re: [RFC/PATCH 1/5] mtd: ubi: Read disturb infrastructure

2014-09-28 Thread Tanya Brokhman
On 9/28/2014 3:11 PM, Artem Bityutskiy wrote: On Sun, 2014-09-28 at 09:37 +0300, Tanya Brokhman wrote: The need for performing read disturb is determined according to new statistics collected per eraseblock: - read counter: incremented at each read operation reset at each erase

Re: [RFC/PATCH 1/5] mtd: ubi: Read disturb infrastructure

2014-09-28 Thread Tanya Brokhman
On 9/28/2014 11:54 AM, Richard Weinberger wrote: Am 28.09.2014 10:48, schrieb Tanya Brokhman: @@ -424,6 +440,8 @@ struct ubi_fm_sb { __be32 used_blocks; __be32 block_loc[UBI_FM_MAX_BLOCKS]; __be32 block_ec[UBI_FM_MAX_BLOCKS]; +__be32 block_rc[UBI_FM_MAX_BLOCKS

Re: [RFC/PATCH 5/5] mtd: ubi: Add sysfs entry to force all pebs' scan

2014-09-28 Thread Tanya Brokhman
On 9/28/2014 11:42 AM, Richard Weinberger wrote: Tanya, On Sun, Sep 28, 2014 at 8:38 AM, Tanya Brokhman wrote: A given eraseblock can be read many times or not at all. We do not have the account of such eraseblocks that have not been accessed since a pre-defined threshold interval. By means

Re: [RFC/PATCH 1/5] mtd: ubi: Read disturb infrastructure

2014-09-28 Thread Tanya Brokhman
Hi Richard On 9/28/2014 11:18 AM, Richard Weinberger wrote: index 0431b46..5399aa2 100644 --- a/drivers/mtd/ubi/fastmap.c +++ b/drivers/mtd/ubi/fastmap.c @@ -1,5 +1,7 @@ /* * Copyright (c) 2012 Linutronix GmbH + * Copyright (c) 2014, Linux Foundation. All rights reserved. + * Diffstat s

Re: [PATCH] mtd: ubi: Extend UBI layer debug/messaging capabilities

2014-09-28 Thread Tanya Brokhman
On 9/28/2014 11:01 AM, Richard Weinberger wrote: Tanya, Am 28.09.2014 08:36, schrieb Tanya Brokhman: If there is more then one UBI device mounted, there is no way to distinguish between messages from different UBI devices. Add device number to all ubi layer message types. Signed-off-by

[RFC/PATCH 5/5] mtd: ubi: Add sysfs entry to force all pebs' scan

2014-09-27 Thread Tanya Brokhman
A given eraseblock can be read many times or not at all. We do not have the account of such eraseblocks that have not been accessed since a pre-defined threshold interval. By means of scanning the entire flash device it is possible to identify all such eraseblocks. Add a sysfs entry to force scan

[RFC/PATCH 4/5] mtd: ubi: Read threshold verification

2014-09-27 Thread Tanya Brokhman
scrubbing is added to the ubi->scrub list. Signed-off-by: Tanya Brokhman --- drivers/mtd/ubi/eba.c | 7 ++- drivers/mtd/ubi/wl.c | 56 +-- 2 files changed, 56 insertions(+), 7 deletions(-) diff --git a/drivers/mtd/ubi/eba.c b/drivers/mtd/

[RFC/PATCH 2/5] mtd: ubi: Fill read disturb statistics

2014-09-27 Thread Tanya Brokhman
From: Tatyana Brokhman Fill in eraseblock statistics needed for read disturb decision making: 1. read counter: incremented at each read operation reset at each erase operation Saved only as part of the meta data in RAM On attach: if fastmap data is missing a default value

[RFC/PATCH 1/5] mtd: ubi: Read disturb infrastructure

2014-09-27 Thread Tanya Brokhman
statistics Signed-off-by: Tanya Brokhman --- drivers/mtd/ubi/build.c | 57 + drivers/mtd/ubi/fastmap.c | 14 +++ drivers/mtd/ubi/ubi-media.h | 32 ++--- drivers/mtd/ubi/ubi.h | 34 +++ drivers/mtd

[RFC/PATCH 3/5] mtd: ubi: Make in_wl_tree function public

2014-09-27 Thread Tanya Brokhman
From: Tatyana Brokhman Make the in_wl_tree function public to be used outside of wl.c. Rename it to ubi_in_wl_tree. Signed-off-by: Tanya Brokhman --- drivers/mtd/ubi/ubi.h | 1 + drivers/mtd/ubi/wl.c | 18 +- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a

[PATCH] mtd: ubi: Extend UBI layer debug/messaging capabilities

2014-09-27 Thread Tanya Brokhman
If there is more then one UBI device mounted, there is no way to distinguish between messages from different UBI devices. Add device number to all ubi layer message types. Signed-off-by: Tanya Brokhman --- drivers/mtd/ubi/attach.c | 138 drivers/mtd/ubi

Re: [RFC/PATCH] mtd: ubi: Free peb's synchronously for fastmap

2014-04-07 Thread Tanya Brokhman
On 4/7/2014 4:02 PM, Richard Weinberger wrote: On Tue, Apr 1, 2014 at 10:01 AM, Tanya Brokhman wrote: At first mount it's possible that there are not enough free PEBs since there are PEB's pending to be erased. In such scenario, fm_pool (which is the pool from which user require

[RFC/PATCH] mtd: ubi: Free peb's synchronously for fastmap

2014-04-01 Thread Tanya Brokhman
At first mount it's possible that there are not enough free PEBs since there are PEB's pending to be erased. In such scenario, fm_pool (which is the pool from which user required PEBs are allocated) will be empty. Try fixing the above described situation by synchronously performing pending erase wo

[RFC/PATCH] mtd: ubi: Fix ubi free PEBs count calculation

2014-04-01 Thread Tanya Brokhman
The ubi->free_count should be updated with every insert/remove to/from the ubi->free list. Signed-off-by: Tanya Brokhman diff --git a/drivers/mtd/ubi/wl.c b/drivers/mtd/ubi/wl.c index 9a36f78..ca74d19 100644 --- a/drivers/mtd/ubi/wl.c +++ b/drivers/mtd/ubi/wl.c @@ -690,6 +690,8 @@ static

[RFC/PATCH] mtd: ubi: Test return value of __wl_get_peb

2014-04-01 Thread Tanya Brokhman
In case of an error (if there are not free PEB's for example), __wl_get_peb will return a negative value. In order to prevent access violation we need to test the returned value prior to using it later on. Signed-off-by: Tatyana Brokhman diff --git a/drivers/mtd/ubi/wl.c b/drivers/mtd/ubi/wl.c i

[RFC/PATCH/RESEND v2 3/4] block: Add API for URGENT request handling

2013-07-12 Thread Tanya Brokhman
This patch add support in block & elevator layers for handling urgent requests. The decision if a request is urgent or not is taken by the scheduler. Request is marked as urgent in cmd_flags (by the scheduler) with a new flag - REQ_URGENT. Urgent request notification is passed to the underlying blo

[RFC/PATCH v2 4/4] block: Add URGENT request notification support to CFQ scheduler

2013-07-12 Thread Tanya Brokhman
When the scheduler reports to the block layer that there is an urgent request pending, the device driver may decide to stop the transmission of the current request in order to handle the urgent one. This is done in order to reduce the latency of an urgent request. For example: long WRITE may be sto

[RFC/PATCH/RESEND v2 2/4] block: Add support for reinsert a dispatched req

2013-07-12 Thread Tanya Brokhman
Add support for reinserting a dispatched request back to the scheduler's internal data structures. This capability is used by the device driver when it chooses to interrupt the current request transmission and execute another (more urgent) pending request. For example: interrupting long write in or

[RFC/PATCH/RESEND v2 1/4] block: make rq->cmd_flags be 64-bit

2013-07-12 Thread Tanya Brokhman
From: Jens Axboe We have officially run out of flags in a 32-bit space. Extend it to 64-bit even on 32-bit archs. Signed-off-by: Jens Axboe diff --git a/block/blk-core.c b/block/blk-core.c index 93a18d1..cfa4dd3 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -174,9 +174,9 @@ void blk_

Re: [RFC/PATCH 4/4] block: Add URGENT request notification support to CFQ scheduler

2013-07-12 Thread Tanya Brokhman
Hello Jeff Thank you for your comments. Please see inline. On 7/11/2013 9:41 PM, Jeff Moyer wrote: Tanya Brokhman writes: When the scheduler reports to the block layer that there is an urgent request pending, the device driver may decide to stop the transmission of the current request in

[RFC/PATCH 3/4] block: Add API for URGENT request handling

2013-07-11 Thread Tanya Brokhman
This patch add support in block & elevator layers for handling urgent requests. The decision if a request is urgent or not is taken by the scheduler. Request is marked as urgent in cmd_flags (by the scheduler) with a new flag - REQ_URGENT. Urgent request notification is passed to the underlying blo

[RFC/PATCH 4/4] block: Add URGENT request notification support to CFQ scheduler

2013-07-11 Thread Tanya Brokhman
When the scheduler reports to the block layer that there is an urgent request pending, the device driver may decide to stop the transmission of the current request in order to handle the urgent one. This is done in order to reduce the latency of an urgent request. For example: long WRITE may be sto

[RFC/PATCH 2/4] block: Add support for reinsert a dispatched req

2013-07-11 Thread Tanya Brokhman
Add support for reinserting a dispatched request back to the scheduler's internal data structures. This capability is used by the device driver when it chooses to interrupt the current request transmission and execute another (more urgent) pending request. For example: interrupting long write in or

[RFC/PATCH 1/4] block: make rq->cmd_flags be 64-bit

2013-07-11 Thread Tanya Brokhman
From: Jens Axboe We have officially run out of flags in a 32-bit space. Extend it to 64-bit even on 32-bit archs. Signed-off-by: Jens Axboe diff --git a/block/blk-core.c b/block/blk-core.c index 93a18d1..cfa4dd3 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -174,9 +174,9 @@ void blk_

[PATCH v9 4/4] block: Adding ROW scheduling algorithm

2013-06-16 Thread Tanya Brokhman
This patch adds the implementation of a new scheduling algorithm - ROW. The policy of this algorithm is to prioritize READ requests over WRITE as much as possible without starving the WRITE requests. The requests are kept in queues according to their priority. The dispatch is done in a Round Robin

[PATCH v9 2/4] block: Add support for reinsert a dispatched req

2013-06-16 Thread Tanya Brokhman
Add support for reinserting a dispatched request back to the scheduler's internal data structures. This capability is used by the device driver when it chooses to interrupt the current request transmission and execute another (more urgent) pending request. For example: interrupting long write in or

[PATCH v9 3/4] block: Add API for urgent request handling

2013-06-16 Thread Tanya Brokhman
This patch add support in block & elevator layers for handling urgent requests. The decision if a request is urgent or not is taken by the scheduler. Request is marked as urgent in cmd_flags (by the scheduler) with a new flag - REQ_URGENT. Urgent request notification is passed to the underlying blo

[PATCH v9 1/4] block: make rq->cmd_flags be 64-bit

2013-06-16 Thread Tanya Brokhman
From: Jens Axboe We have officially run out of flags in a 32-bit space. Extend it to 64-bit even on 32-bit archs. Signed-off-by: Jens Axboe diff --git a/block/blk-core.c b/block/blk-core.c index 0852e5d..0256a5b 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -174,9 +174,9 @@ void blk_

[PATCH v8 3/4] block: Add API for urgent request handling

2013-06-09 Thread Tanya Brokhman
This patch add support in block & elevator layers for handling urgent requests. The decision if a request is urgent or not is taken by the scheduler. Request is marked as urgent in cmd_flags (by the scheduler) with a new flag - REQ_URGENT. Urgent request notification is passed to the underlying blo

[PATCH/RESEND v8 4/4] block: Adding ROW scheduling algorithm

2013-06-09 Thread Tanya Brokhman
This patch adds the implementation of a new scheduling algorithm - ROW. The policy of this algorithm is to prioritize READ requests over WRITE as much as possible without starving the WRITE requests. The requests are kept in queues according to their priority. The dispatch is done in a Round Robin

[PATCH/RESEND v8 2/4] block: Extend cmd_flags in struct request

2013-06-09 Thread Tanya Brokhman
At the moment no new request flags can be added to enum rq_flag_bits due to cmd_flags field size limitation. This commit adds a new filed to be used as an extensions to cmd_flags. Signed-off-by: Tanya Brokhman diff --git a/block/blk-core.c b/block/blk-core.c index fe3683c..3a14987 100644 --- a

[PATCH/RESEND v8 1/4] block: Add support for reinsert a dispatched req

2013-06-09 Thread Tanya Brokhman
Add support for reinserting a dispatched request back to the scheduler's internal data structures. This capability is used by the device driver when it chooses to interrupt the current request transmission and execute another (more urgent) pending request. For example: interrupting long write in or

[PATCH v7 4/4] block: Adding ROW scheduling algorithm

2013-06-06 Thread Tanya Brokhman
This patch adds the implementation of a new scheduling algorithm - ROW. The policy of this algorithm is to prioritize READ requests over WRITE as much as possible without starving the WRITE requests. The requests are kept in queues according to their priority. The dispatch is done in a Round Robin

[PATCH v7 1/4] block: Add support for reinsert a dispatched req

2013-06-06 Thread Tanya Brokhman
Add support for reinserting a dispatched request back to the scheduler's internal data structures. This capability is used by the device driver when it chooses to interrupt the current request transmission and execute another (more urgent) pending request. For example: interrupting long write in or

[PATCH v7 2/4] block: Extend cmd_flags in struct request

2013-06-06 Thread Tanya Brokhman
At the moment no new request flags can be added to enum rq_flag_bits due to cmd_flags field size limitation. This commit adds a new filed to be used as an extensions to cmd_flags. Signed-off-by: Tanya Brokhman diff --git a/block/blk-core.c b/block/blk-core.c index fe3683c..3a14987 100644 --- a

[PATCH v7 3/4] block: Add API for urgent request handling

2013-06-06 Thread Tanya Brokhman
This patch add support in block & elevator layers for handling urgent requests. The decision if a request is urgent or not is taken by the scheduler. Request is marked as urgent in cmd_flags (by the scheduler) with a new flag - REQ_URGENT. Urgent request notification is passed to the underlying blo

[PATCH/RESEND v6 3/3] block: Adding ROW scheduling algorithm

2013-05-12 Thread Tanya Brokhman
This patch adds the implementation of a new scheduling algorithm - ROW. The policy of this algorithm is to prioritize READ requests over WRITE as much as possible without starving the WRITE requests. The requests are kept in queues according to their priority. The dispatch is done in a Round Robin

[PATCH v6 2/3] block: Add API for urgent request handling

2013-05-12 Thread Tanya Brokhman
This patch add support in block & elevator layers for handling urgent requests. The decision if a request is urgent or not is taken by the scheduler. Request is marked as urgent in cmd_flags (by the scheduler) with a new flag - REQ_URGENT. Urgent request notification is passed to the underlying blo

[PATCH v6 1/3] block: Add support for reinsert a dispatched req

2013-05-12 Thread Tanya Brokhman
Add support for reinserting a dispatched request back to the scheduler's internal data structures. This capability is used by the device driver when it chooses to interrupt the current request transmission and execute another (more urgent) pending request. For example: interrupting long write in or

Re: [PATCH v5 2/3] block: Add API for urgent request handling

2013-04-03 Thread Tanya Brokhman
On 3/25/2013 2:40 PM, Jens Axboe wrote: On Mon, Mar 25 2013, Tanya Brokhman wrote: This patch add support in block & elevator layers for handling urgent requests. The decision if a request is urgent or not is taken by the scheduler. Request is marked as urgent in cmd_flags (by the sched

Re: [PATCH v5 1/3] block: Add support for reinsert a dispatched req

2013-03-29 Thread Tanya Brokhman
nt the existing > requeue event, or a reinsert event. > Thank you for the input. Will do and upload a new patch. Thanks, Tanya Brokhman -- QUALCOMM ISRAEL, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation -- To unsubscribe fro

[PATCH v5 3/3] block: Adding ROW scheduling algorithm

2013-03-25 Thread Tanya Brokhman
This patch adds the implementation of a new scheduling algorithm - ROW. The policy of this algorithm is to prioritize READ requests over WRITE as much as possible without starving the WRITE requests. The requests are kept in queues according to their priority. The dispatch is done in a Round Robin

  1   2   >