minor clarification, On Mon, Oct 29, 2012 at 10:40 PM, Per Forlin <per.lkml@xxxxxxxxx> wrote: > Hi, > > I would like to move the focus of my concerns from root cause analysis > to the actual patch, > My first reflection is that the patch is relatively complex and some > of the code looks duplicated. > Would it be possible to simplify it and re-use the current execution flow. > > Is the following flow feasible? > > in mmc_start_req(): > -------------- > if (rqc == NULL && not_resend) && request_is_ongoing (in case of resend request is never ongoing > wait_for_both_mmc_and_arrival_of_new_req We should wake up if any of the two events occur. > else > wait_only_for_mmc > > if (arrival_of_new_req) { > set flag to indicate fetch-new_req > return NULL; > } > ----------------- > > in queue.c: > if (fetch-new_req) > don't overwrite previous req. > This is somewhat a subset of the your patch. Maybe I'm missing parts of the complexity. I haven't figured out why a new mmc_start_data_req() is needed. A new mechanism for waiting is required. BR Per > BR > Per > > > > On Sun, Oct 28, 2012 at 2:12 PM, Konstantin Dorfman > <kdorfman@xxxxxxxxxxxxxx> wrote: >> Hello, >> >> On 10/26/2012 02:07 PM, Venkatraman S wrote: >> >>> >>> Actually there could a lot of reasons why block layer or CFQ would not have >>> inserted the request into the queue. i.e. you can see a lot of exit paths >>> where blk_peek_request returns NULL, even though there could be any request >>> pending in one of the CFQ requests queues. >>> >>> Essentially you need to check what makes blk_fetch_request >>> (cfq_dispatch_requests() ) return NULL when there is an element in >>> queue, if at all. >>> >> >> This is not important why block layer causes to blk_fetch_request() (or >> blk_peek_request()) to return NULL to the MMC 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, 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 majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html