Re: execution order of packed command in eMMC

2015-05-07 Thread Konstantin Dorfman
Hello, On 05/06/2015 09:16 PM, Meng Wang wrote: sequence that they are listed in the packed command header. So when error happens, I can safely assert it is completed for the first PACKED_FAILURE_INDEX commands in one pack. Is my understanding correct? Yes, mmc_blk_end_packed_req() will

Re: [RFC/PATCH] mmc: block: use block layer pm helpers for pm of card device

2015-04-29 Thread Konstantin Dorfman
Hello Ulf, Chris, Now as rc1 is out and the patch format fixed, please look into it again. Thanks, Kostya On 04/21/2015 05:20 PM, Konstantin Dorfman wrote: Use of block layer runtime PM helpers, implementing the block layer's request-based mechanism, simplifies data path of mmc core layer

Re: [PATCH] mmc: block: use block layer pm helpers for pm of card device

2015-04-01 Thread Konstantin Dorfman
Hello all, Any comments? I'm working on power management for eMMC CQ command queuing solution (these are patches released by Asutosh Das). Using the block layer pm helpers is important to be able to issue a data requests in non-blocking way directly from the block layer contexts, so it is

Re: [PATCH] mmc: core: Enable runtime PM management of host devices

2015-03-30 Thread Konstantin Dorfman
; spin_unlock_irqrestore(host-lock, flags); wake_up(host-wq); + pm_runtime_mark_last_busy(mmc_dev(host)); + pm_runtime_put_autosuspend(mmc_dev(host)); } } EXPORT_SYMBOL(mmc_release_host); Acked-by: Konstantin Dorfman kdorf...@codeaurora.org -- Qualcomm

[PATCH] mmc: block: use block layer pm helpers for pm of card device

2015-03-29 Thread Konstantin Dorfman
-- Qualcomm Israel, on behalf of Qualcomm Innovation Center, Inc. Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project From a429c2c9357c26862a45fd01fff3ed7ec5d69fd7 Mon Sep 17 00:00:00 2001 From: Konstantin Dorfman kdorf...@codeaurora.org

Re: [PATCH] mmc: core: Enable runtime PM management of host devices

2015-03-29 Thread Konstantin Dorfman
On 03/28/2015 12:52 AM, NeilBrown wrote: On Fri, 27 Mar 2015 12:15:15 +0100 Ulf Hansson ulf.hans...@linaro.org wrote: Currently those host drivers which have deployed runtime PM, deals with the runtime PM reference counting entirely by themselves. Since host drivers don't know when the core

Fwd: Re: mmc: core: retries counter for data command initialization.

2014-05-12 Thread Konstantin Dorfman
Hello Chris, Ulf, Sorry for nagging. Do you have opinion on issue with retries counter for data command? Since till now the code behave as there is no retry, may be it is better to remove dead code? Or the counter need to be initialized properly. On 04/29/14 10:55, Konstantin Dorfman wrote

Re: wait_for_completion in mmc_wait_for_req_done never returns

2014-05-01 Thread Konstantin Dorfman
On 03/01/14 18:03, Jon Ringle wrote: I'm porting an arm board from linux-3.10 to linux-3.12 and found that I can no longer detect the SD card. I found that the wait_for_completion(mrq-completion) in drivers/mmc/core/core.c:mmc_wait_for_req_done() is never returning. Can you post relevant

Re: mmc: core: retries counter for data command initialization.

2014-04-29 Thread Konstantin Dorfman
On 04/29/14 10:55, Konstantin Dorfman wrote: Correction inside Hi All, After 6035d9730d5825e6e3c225b721a5847a521d6556 mmc: fix async request mechanism for sequential read scenarios mmc layer data path async request handling was separated from mmc commands path. mmc_wait_for_data_req_done

Re: help with 'discard' mount option on eMMC

2013-10-10 Thread Konstantin Dorfman
Hello, Could you please post kernel log of such failure? What hw are you using? On 10/10/13 09:44, Prasanna NAVARATNA wrote: Hello, I'm using Hynix eMMC4.41 with Linux kernel 3.4.5. After mounting ext4 partition /userdata with 'discard' mount option enabled, fs triggers TRIM commands to eMMC

Re: help with 'discard' mount option on eMMC

2013-10-10 Thread Konstantin Dorfman
Hello, On 10/10/13 12:40, Prasanna NAVARATNA wrote: Hello, Could you please post kernel log of such failure? What hw are you using? I'm using sdhci controller. Hynix eMMC4.41. Linux Kernel 3.4.5 There are no kernel log failures as such. I need it to understand the flow. Also - how exactly

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

2013-08-04 Thread Konstantin Dorfman
is not changed, so it will be scheduled according to its deadline. In case you need special requirements for say low priority read it should be implemented within block layer scheduler (existing one or new). Thanks, -- Konstantin Dorfman, QUALCOMM ISRAEL, on behalf of Qualcomm Innovation Center, Inc

[RFC/PATCH] mmc: Add support to handle Urgent data transfer request

2013-06-09 Thread Konstantin Dorfman
is the average of 5 runs. Resulting worst case latency improved by factor 9. Konstantin Dorfman (1): mmc: Add support to handle Urgent data transfer request drivers/mmc/card/block.c | 151 +- drivers/mmc/card/queue.c | 54 - drivers/mmc/card/queue.h

[RFC/PATCH] mmc: Add support to handle Urgent data transfer request

2013-06-09 Thread Konstantin Dorfman
of the above dependencies are not met then urgent request mechanism will not become operational. Signed-off-by: Konstantin Dorfman kdorf...@codeaurora.org diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c index c900d28..b43e6ac 100644 --- a/drivers/mmc/card/block.c +++ b/drivers/mmc/card

[RFC/PATCH] mmc: core: fix HPI polling timeout

2013-05-13 Thread Konstantin Dorfman
Out of CPU time for the MMC context included into measured timeout. System under heavy load will easily exceed out_of_int_time (typically 20 ms). In this case real card status checked again and error reported for wrong card state only. Signed-off-by: Konstantin Dorfman kdorf...@codeaurora.org

Re: [PATCH 1/2] mmc: core: fix permanent sleep of mmcqd during card removal

2013-02-08 Thread Konstantin Dorfman
Works for me. Tested-by: Konstantin Dorfman kdorf...@codeaurora.org On 01/22/2013 12:48 PM, Seungwon Jeon wrote: This patch is derived from 'mmc: fix async request mechanism ...'. According as async transfer, a request is handled with twice mmc_start_req. When the card is removed, the request

Re: [PATCH 1/2] mmc: core: fix permanent sleep of mmcqd during card removal

2013-02-04 Thread Konstantin Dorfman
/majordomo-info.html -- Konstantin Dorfman, QUALCOMM ISRAEL, on behalf of 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-mmc in the body of a message to majord...@vger.kernel.org More

Re: MMC Driver Throughput

2013-01-31 Thread Konstantin Dorfman
. -- Konstantin Dorfman, QUALCOMM ISRAEL, on behalf of 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-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http

Re: [PATCH v5] mmc: fix async request mechanism for sequential read scenarios

2013-01-15 Thread Konstantin Dorfman
On 01/14/2013 09:31 PM, Chris Ball wrote: Hi Konstantin, On Fri, Dec 28 2012, Seungwon Jeon wrote: I checked the changes. Thanks for your work. Reviewed-by: Seungwon Jeon tgih@samsung.com On Wednesday, December 26, 2012, Konstantin Dorfman wrote: When current request is running

Re: [RFC PATCH 00/11] [FS, MM, block, MMC]: eMMC High Priority Interrupt Feature

2013-01-09 Thread Konstantin Dorfman
Hello Sergey, I'm working on the same flow - to reduce read latency hit (as a result of big aggregated writes). I plan to send all relevant patches to the mailing list soon and it will be great if you can test them on your system. There are requirements for this flow is: - eMMC 4.5

Re: [PATCH] mmc: correct the EXCEPTION_EVENTS_STATUS vaule comment

2013-01-08 Thread Konstantin Dorfman
; /* 54 */ u8 raw_partition_support; /* 160 */ u8 raw_rpmb_size_mult; /* 168 */ u8 raw_erased_mem_count; /* 181 */ -- Konstantin Dorfman, QUALCOMM ISRAEL, on behalf of Qualcomm Innovation Center, Inc

Re: [PATCH v2] mmc: queue: exclude asynchronous transfer for special request

2012-12-27 Thread Konstantin Dorfman
Reviewed-by: Konstantin Dorfman kdorf...@codeaurora.org On 12/26/2012 03:40 AM, Seungwon Jeon wrote: Unlike normal r/w request, special requests(discard, flush) is finished with a one-time issue_fn. Request change to mqrq_prev makes unnecessary call. Signed-off-by: Seungwon Jeon tgih

[PATCH v5] mmc: fix async request mechanism for sequential read scenarios

2012-12-26 Thread Konstantin Dorfman
means this new request can be started immediately after the current running request completes. With this change read throughput is improved by 16%. Signed-off-by: Konstantin Dorfman kdorf...@codeaurora.org --- v5: - Removed BUG() and BUG_ON() with proper error handling - Turn

Re: [PATCH] mmc: queue: exclude asynchronous transfer for special request

2012-12-22 Thread Konstantin Dorfman
On 12/21/2012 07:36 AM, Seungwon Jeon wrote: On Thursday, December 20, 2012, Konstantin Dorfman wrote: Hello Jeon, On 12/20/2012 12:27 PM, Seungwon Jeon wrote: Unlike normal r/w request, special requests(discard, flush) is finished with a one-time issue_fn. Request change to mqrq_prev makes

Re: [PATCH] mmc: queue: exclude asynchronous transfer for special request

2012-12-20 Thread Konstantin Dorfman
all control/special requests. Then, when additional request will be added, there will be no need to change here, only update the mask. Another option - to clean mq-mqrq_cur-req immediately after executing a special request in mmc_blk_issue_rq(). -- Konstantin Dorfman, QUALCOMM ISRAEL, on behalf

Re: [RESEND PATCH v4] mmc: fix async request mechanism for sequential read scenarios

2012-12-18 Thread Konstantin Dorfman
On 12/17/2012 02:26 PM, Seungwon Jeon wrote: Hi, Konstantin. I added comments more below. I've answered below. On Wednesday, December 12, 2012, Seungwon Jeon wrote: On Monday, December 10, 2012, Konstantin Dorfman wrote: When current request is running on the bus and if next request

[RESEND PATCH v4] mmc: fix async request mechanism for sequential read scenarios

2012-12-10 Thread Konstantin Dorfman
means this new request can be started immediately after the current running request completes. With this change read throughput is improved by 16%. Signed-off-by: Konstantin Dorfman kdorf...@codeaurora.org --- v4: keeps new synchronization mechanism within mmc/core layer, so mmc

Re: [PATCH v4] mmc: fix async request mechanism for sequential read scenarios

2012-12-06 Thread Konstantin Dorfman
protocol willing to use NEW_REQUEST notification (when async request mechanism is used). -- Konstantin Dorfman, QUALCOMM ISRAEL, on behalf of 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

[PATCH v4] mmc: fix async request mechanism for sequential read scenarios

2012-12-05 Thread Konstantin Dorfman
means this new request can be started immediately after the current running request completes. With this change read throughput is improved by 16%. Signed-off-by: Konstantin Dorfman kdorf...@codeaurora.org --- v4: keeps new synchronization mechanism within mmc/core layer, so mmc/core

Re: [PATCH v1] mmc: fix async request mechanism for sequential read scenarios

2012-11-26 Thread Konstantin Dorfman
Hello, On 11/19/2012 11:34 PM, Per Förlin wrote: On 11/19/2012 03:32 PM, Per Förlin wrote: On 11/19/2012 10:48 AM, Konstantin Dorfman wrote: I'm fine with wait_event() (block request transfers) combined with completion (for other transfer), as long as the core.c API is intact. I don't see

Re: [PATCH v1] mmc: fix async request mechanism for sequential read scenarios

2012-11-20 Thread Konstantin Dorfman
to create any ut scenarios. -- Konstantin Dorfman, QUALCOMM ISRAEL, on behalf of 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-mmc in the body of a message to majord...@vger.kernel.org

Re: [PATCH v1] mmc: fix async request mechanism for sequential read scenarios

2012-11-20 Thread Konstantin Dorfman
Correction inside On Tue, November 20, 2012 6:26 pm, Konstantin Dorfman wrote: Hello, On 11/19/2012 11:34 PM, Per Förlin wrote: if (host-areq) { + if (!areq) + mmc_prefetch_init(host-areq, + host-areq-mrq-completion

Re: [PATCH v1] mmc: fix async request mechanism for sequential read scenarios

2012-11-19 Thread Konstantin Dorfman
Hello Per, Thank you for giving me an example, below I'm trying to explain some logic issues of it and asking you some questions about your vision of the patch. On 11/15/2012 06:38 PM, Per Förlin wrote: On 11/14/2012 04:15 PM, Konstantin Dorfman wrote: Hello Per, On 11/13/2012 11:10 PM, Per

Re: [PATCH v1] mmc: fix async request mechanism for sequential read scenarios

2012-11-14 Thread Konstantin Dorfman
Hello Per, On 11/13/2012 11:10 PM, Per Forlin wrote: On Tue, Oct 30, 2012 at 1:19 PM, Konstantin Dorfman kdorf...@codeaurora.org wrote: Hello, On 10/29/2012 11:40 PM, Per Forlin wrote: Hi, I would like to move the focus of my concerns from root cause analysis to the actual patch, My

Re: [PATCH v2] mmc: fix async request mechanism for sequential read scenarios

2012-11-12 Thread Konstantin Dorfman
On 11/05/2012 09:15 AM, Jaehoon Chung wrote: Hello, Hi Konstantin, On 11/05/2012 03:20 PM, Per Förlin wrote: Hi Konstantin, On 11/01/2012 03:40 PM, Konstantin Dorfman wrote: When current request is running on the bus and if next request fetched by mmcqd is NULL, mmc context (mmcqd thread

Re: [PATCH v2] mmc: fix async request mechanism for sequential read scenarios

2012-11-12 Thread Konstantin Dorfman
request is done/finished. Thanks, -- Konstantin Dorfman, QUALCOMM ISRAEL, on behalf of 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-mmc in the body of a message to majord

Re: [PATCH v2] mmc: fix async request mechanism for sequential read scenarios

2012-11-12 Thread Konstantin Dorfman
On 11/05/2012 08:20 AM, Per Förlin wrote: Hi Konstantin, On 11/01/2012 03:40 PM, Konstantin Dorfman wrote: When current request is running on the bus and if next request fetched by mmcqd is NULL, mmc context (mmcqd thread) gets blocked until the current request completes. This means if new

[PATCH v3] mmc: fix async request mechanism for sequential read scenarios

2012-11-12 Thread Konstantin Dorfman
means this new request can be started immediately after the current running request completes. With this change read throughput is improved by 16%. Signed-off-by: Konstantin Dorfman kdorf...@codeaurora.org --- v3: - new MMC_QUEUE_NEW_REQUEST flag to mark new request case - lock added

[PATCH v2] mmc: fix async request mechanism for sequential read scenarios

2012-11-01 Thread Konstantin Dorfman
means this new request can be started immediately after the current running request completes. With this change read throughput is improved by 16%. Signed-off-by: Konstantin Dorfman kdorf...@codeaurora.org --- drivers/mmc/card/block.c | 26 +--- drivers/mmc/card/queue.c | 26

Re: [PATCH v1] mmc: fix async request mechanism for sequential read scenarios

2012-10-30 Thread Konstantin Dorfman
eMMC HPI feature (to stop currently running request). I will publish this patch soon. Your idea with fetch_new_req flag is good, I'll try to simplify current patch and lets talk again. Thanks, -- Konstantin Dorfman, QUALCOMM ISRAEL, on behalf of Qualcomm Innovation Center, Inc. is a member of Code

Re: [PATCH v1] mmc: fix async request mechanism for sequential read scenarios

2012-10-30 Thread Konstantin Dorfman
mechanism for waiting, I will fix this to minimize changes. -- Konstantin Dorfman, QUALCOMM ISRAEL, on behalf of 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-mmc in the body

Re: [PATCH v1] mmc: fix async request mechanism for sequential read scenarios

2012-10-28 Thread Konstantin Dorfman
layer, but what is really important - MMC layer should always be able to fetch the new arrived request ASAP, after block layer notification (mmc_request() ) and this is what my fix goes to implement. And the fix is not changing block layer behavior. Thanks -- Konstantin Dorfman, QUALCOMM ISRAEL

Re: [PATCH v1] mmc: fix async request mechanism for sequential read scenarios

2012-10-24 Thread Konstantin Dorfman
hits throughput and latency. The solution we are talking about here will fix not only situation with FS read ahead mechanism, but also it will remove penalty of the MMC context waiting on completion while any new request arrives. Thanks, -- Konstantin Dorfman, QUALCOMM ISRAEL, on behalf of Qualcomm

[PATCH v1] mmc: fix async request mechanism for sequential read scenarios

2012-10-15 Thread Konstantin Dorfman
its preparation will go back to waiting on the completion. Our tests showed that this fix improves the read sequential throughput by 16%. Signed-off-by: Konstantin Dorfman kdorf...@codeaurora.org diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c index 172a768..4d6431b 100644

Re: [PATCH] mmc: fix async request mechanism for sequential read scenarios

2012-10-14 Thread Konstantin Dorfman
, the solution has nothing to do with block layer context. On Tue, Oct 2, 2012 at 5:39 PM, Konstantin Dorfman kdorf...@codeaurora.org wrote: The main assumption of the async request design is that the file system adds block requests to the block device queue asynchronously without waiting

[PATCH] mmc: fix async request mechanism for sequential read scenarios

2012-10-02 Thread Konstantin Dorfman
its preparation will go back to waiting on the completion. Our tests showed that this fix improves the read sequential throughput by 16%. Konstantin Dorfman (1): mmc: fix async request mechanism for sequential read scenarios drivers/mmc/card/block.c | 30 - drivers/mmc/card/queue.c

[PATCH] mmc: fix async request mechanism for sequential read scenarios

2012-10-02 Thread Konstantin Dorfman
its preparation will go back to waiting on the completion. Our tests showed that this fix improves the read sequential throughput by 16%. Signed-off-by: Konstantin Dorfman kdorf...@codeaurora.org diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c index 172a768..cb32d4c 100644

RE: [PATCH v9] mmc: support BKOPS feature for eMMC

2012-06-14 Thread Konstantin Dorfman
Hello Dong, On Wed, June 13, 2012 3:40 pm, Dong, Chuanxiao wrote: Hi Jaehoon, diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 0b6141d..9adb004 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -41,6 +41,12 @@ #include sd_ops.h #include

Re: [PATCH v9] mmc: support BKOPS feature for eMMC

2012-06-14 Thread Konstantin Dorfman
-by: Jaehoon Chung jh80.ch...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com Signed-off-by: Konstantin Dorfman kdorf...@codeaurora.org Signed-off-by: Maya Erez me...@codeaurora.org --- I would not expect this to work nicely with runtime PM. I expect that BKOPS would need

Re: [RFC PATCH 00/11] [FS, MM, block, MMC]: eMMC High Priority Interrupt Feature

2012-05-15 Thread Konstantin Dorfman
On Wed, April 18, 2012 9:25 am, Venkatraman S wrote: Hello, a) At the top level, some policy decisions have to be made on what is worth preempting for. This implementation uses the demand paging requests and swap read requests as potential reads worth preempting an ongoing long write.

Re: [PATCH v7] mmc: support BKOPS feature for eMMC

2012-03-11 Thread Konstantin Dorfman
__mmc_switch(card, set, index, timeout_ms, 0); } 3. when you need to start bkops, use: __mmc_switch(card, set, index, timeout_ms, 1); Does it make sense? -- Konstantin Dorfman Consultant for Qualcomm Innovation Center, Inc. Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum

Re: [PATCH v7] mmc: support BKOPS feature for eMMC

2012-02-21 Thread Konstantin Dorfman
Hello Jaehoon, I'm testing your patch and will post review soon. Have you ever seen urgent BKOPS triggered? I have BUGON() on such event and till now never seen it. -- Konstantin Dorfman Consultant for Qualcomm Innovation Center, Inc. Qualcomm Innovation Center, Inc. is a member of Code Aurora

Re: [PATCH v3] mmc: support BKOPS feature for eMMC

2011-12-01 Thread Konstantin Dorfman
Hello Jaehoon, After applying your patch and debugging it for some time, I want to share my results and suggests some changes to the patch. See comments below: +void mmc_start_bkops(struct mmc_card *card) +{ + int err; + unsigned long flags; + + BUG_ON(!card); + if

Re: [PATCH v2] mmc: support BKOPS feature for eMMC

2011-11-29 Thread Konstantin Dorfman
First of all protocol state: -- 7.4.57 BKOPS_EN [163] This field allows the _host_ to indicate to the device if it is expected to periodically manually start background operations by writing to the BKOPS_START field. ...In order for the device to know if host

Re: [PATCH v2] mmc: support BKOPS feature for eMMC

2011-11-28 Thread Konstantin Dorfman
Hello Jaehoon, Per I have experimented with eMMC v4.41 card and BKOPS feature and want to add info on EXT_CSD_BKOPS_EN[163] field. See below. Hi Per if (card-ext_csd.rev = 5) { + /* check whether the eMMC card support BKOPS */ + if

Re: [PATCH v3] mmc: support BKOPS feature for eMMC

2011-11-28 Thread Konstantin Dorfman
Hi Jaehoon, i didn't know how poll for ack from card..did you know? So i implemented that send the hpi command whatever status. If let me know checking for ack from card, i will consider that. Some of MMC controllers (in my case msm_sdcc) can process automatically busy line and fire

Re: [PATCH v3] mmc: support BKOPS feature for eMMC

2011-11-22 Thread Konstantin Dorfman
Hello Jaehoon, ... +/** + * mmc_start_bkops - start BKOPS for supported cards + * @card: MMC card to start BKOPS + * + * Start background operations whenever requested. + * when the urgent BKOPS bit is set in a R1 command response + * then background operations should be started

Re: [PATCH v3] mmc: support BKOPS feature for eMMC

2011-11-20 Thread Konstantin Dorfman
Hello Per, On Thu, Nov 17, 2011 at 4:01 PM, Konstantin Dorfman kdorf...@codeaurora.org wrote: Hello Jaenhoon, I have a few suggestions regarding the situation when Host starts BKOPS: 1) Host should start BKOPS (based on BKOPS_STATUS or URGENT_BKOPS event) when going to mmc_sleep, which

RE: [PATCH v3] mmc: support BKOPS feature for eMMC

2011-11-17 Thread Konstantin Dorfman
an answer to the question about need to interrupt BKOPS before powering off card - the answer is no. 3) Based on statistical data we have (day long test) it looks like we do not need to do any preventive BKOPS caused by BKOPS_STATUS less than critical (0x3). Thanks, Konstantin Dorfman Qualcomm