linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ulf Hansson <ulf.hansson@linaro.org>,
	linux-mmc <linux-mmc@vger.kernel.org>,
	linux-block <linux-block@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Bough Chen <haibo.chen@nxp.com>,
	Alex Lemberg <alex.lemberg@sandisk.com>,
	Mateusz Nowak <mateusz.nowak@intel.com>,
	Yuliy Izrailov <Yuliy.Izrailov@sandisk.com>,
	Jaehoon Chung <jh80.chung@samsung.com>,
	Dong Aisheng <dongas86@gmail.com>,
	Das Asutosh <asutoshd@codeaurora.org>,
	Zhangfei Gao <zhangfei.gao@gmail.com>,
	Sahitya Tummala <stummala@codeaurora.org>,
	Harjani Ritesh <riteshh@codeaurora.org>,
	Venu Byravarasu <vbyravarasu@nvidia.com>,
	Shawn Lin <shawn.lin@rock-chips.com>,
	Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH V13 10/10] mmc: block: blk-mq: Stop using legacy recovery
Date: Thu, 9 Nov 2017 13:45:39 +0100	[thread overview]
Message-ID: <CACRpkdbDWmOTOP1JmriFkpH_rEYJQv17_OhBvNbHY-4Y6m61qA@mail.gmail.com> (raw)
In-Reply-To: <3608285c-614a-36cc-5f7b-5fb5708c1a84@intel.com>

On Thu, Nov 9, 2017 at 8:43 AM, Adrian Hunter <adrian.hunter@intel.com> wrote:
> On 08/11/17 11:38, Linus Walleij wrote:
>> On Fri, Nov 3, 2017 at 2:20 PM, Adrian Hunter <adrian.hunter@intel.com> wrote:
>>
>>> There are only a few things the recovery needs to do. Primarily, it just
>>> needs to:
>>>         Determine the number of bytes transferred
>>>         Get the card back to transfer state
>>>         Determine whether to retry
>>>
>>> There are also a couple of additional features:
>>>         Reset the card before the last retry
>>>         Read one sector at a time
>>>
>>> The legacy code spent much effort analyzing command errors, but commands
>>> fail fast, so it is simpler just to give all command errors the same number
>>> of retries.
>>>
>>> Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
>>
>> I have nothing against the patch as such. In fact something
>> like this makes a lot of sense (to me).
>>
>> But this just makes mmc_blk_rw_recovery() look really nice.
>>
>> And leaves a very ugly mmc_blk_issue_rw_rq() with the legacy
>> error handling in-tree.
>>
>> The former function isn't even named with some *mq* infix
>> making it clear that the new recovery path only happens
>> in the MQ case.
>>
>> If newcomers read this code in the MMC stack they will
>> just tear their hair, scream and run away. Even faster than
>> before.
>>
>> How are they supposed to know which functions are used on
>> which path? Run ftrace?
>
> You're kidding me right?  You don't know how to find where a function used?

What I mean is that there are now several functions in the same
file doing similar things, and it is pretty hard for a newcomer
already (IMO) to understand how the MMC/SD stack works.

This phenomenon of code complexity is not just making me
frustrated but also you, because you get annoyed that people
like me don't "just get it".

>> This illustrates firmly why we need to refactor and/or kill off
>> the old block layer interface *first* then add MQ on top.
>
> No it doesn't!  You are playing games!

You need to stop your snarky and undfriendly attitude.

Look Adrian: you have one (1) person reviewing your patches.
That is me.

I think need to quote Documentation/process/6.Followthrough.rst
in verbatim (it's an awesome piece of text!)

----8<--------8<-------8<------

Working with reviewers
----------------------

A patch of any significance will result in a number of comments from other
developers as they review the code.  Working with reviewers can be, for
many developers, the most intimidating part of the kernel development
process.  Life can be made much easier, though, if you keep a few things in
mind:

 - If you have explained your patch well, reviewers will understand its
   value and why you went to the trouble of writing it.  But that value
   will not keep them from asking a fundamental question: what will it be
   like to maintain a kernel with this code in it five or ten years later?
   Many of the changes you may be asked to make - from coding style tweaks
   to substantial rewrites - come from the understanding that Linux will
   still be around and under development a decade from now.

 - Code review is hard work, and it is a relatively thankless occupation;
   people remember who wrote kernel code, but there is little lasting fame
   for those who reviewed it.  So reviewers can get grumpy, especially when
   they see the same mistakes being made over and over again.  If you get a
   review which seems angry, insulting, or outright offensive, resist the
   impulse to respond in kind.  Code review is about the code, not about
   the people, and code reviewers are not attacking you personally.

 - Similarly, code reviewers are not trying to promote their employers'
   agendas at the expense of your own.  Kernel developers often expect to
   be working on the kernel years from now, but they understand that their
   employer could change.  They truly are, almost without exception,
   working toward the creation of the best kernel they can; they are not
   trying to create discomfort for their employers' competitors.

What all of this comes down to is that, when reviewers send you comments,
you need to pay attention to the technical observations that they are
making.  Do not let their form of expression or your own pride keep that
from happening.  When you get review comments on a patch, take the time to
understand what the reviewer is trying to say.  If possible, fix the things
that the reviewer is asking you to fix.  And respond back to the reviewer:
thank them, and describe how you will answer their questions.

----8<--------8<-------8<------

> One function could be named
> differently, so that is evidence the whole patch set should be ignored.

No I was not pointing to that at all.

> The old code is rubbish.  There is nothing worth keeping.  Churning it
> around is a waste of everybody's time.  Review and test the new code.
> Delete the old code.  Much much simpler!

Yeah, but you do not delete the old code in your patch
set so why are you are saying this?

The essence of my response to patch 3 was exactly that if
you have this "my way or the highway" (i.e. delete all the old
code paths) attitude to the code (which I kind of understand)
Then go all in and actually delete it.

As it is, here, at the end of the patch set, the old legacy block
path and combersome error handling still exists.

Yours,
Linus Walleij

  reply	other threads:[~2017-11-09 12:45 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-03 13:20 [PATCH V13 00/10] mmc: Add Command Queue support Adrian Hunter
2017-11-03 13:20 ` [PATCH V13 01/10] mmc: core: Add parameter use_blk_mq Adrian Hunter
2017-11-06  8:38   ` Linus Walleij
2017-11-03 13:20 ` [PATCH V13 02/10] mmc: block: Add error-handling comments Adrian Hunter
2017-11-06  8:39   ` Linus Walleij
2017-11-03 13:20 ` [PATCH V13 03/10] mmc: block: Add blk-mq support Adrian Hunter
2017-11-08  8:54   ` Linus Walleij
2017-11-09 10:42     ` Adrian Hunter
2017-11-09 15:52       ` Linus Walleij
2017-11-10 10:19         ` Linus Walleij
2017-11-14 13:10         ` Adrian Hunter
2017-11-14 14:50           ` Linus Walleij
2017-11-15 10:55             ` Ulf Hansson
2017-11-15 13:07               ` Adrian Hunter
2017-11-16  7:19                 ` Ulf Hansson
2017-11-03 13:20 ` [PATCH V13 04/10] mmc: block: Add CQE support Adrian Hunter
2017-11-08  9:00   ` Linus Walleij
2017-11-08 13:20     ` Adrian Hunter
2017-11-09 12:04       ` Linus Walleij
2017-11-09 12:39         ` Adrian Hunter
2017-11-03 13:20 ` [PATCH V13 05/10] mmc: cqhci: support for command queue enabled host Adrian Hunter
2017-11-08  9:22   ` Linus Walleij
2017-11-08 14:14     ` Adrian Hunter
2017-11-09 12:26       ` Linus Walleij
2017-11-09 12:55         ` Adrian Hunter
2017-11-10  8:29           ` Linus Walleij
2017-11-09 13:41   ` Ulf Hansson
2017-11-09 14:20     ` Adrian Hunter
2017-11-03 13:20 ` [PATCH V13 06/10] mmc: sdhci-pci: Add CQHCI support for Intel GLK Adrian Hunter
2017-11-08  9:24   ` Linus Walleij
2017-11-09  7:12     ` Adrian Hunter
2017-11-10  8:18       ` Linus Walleij
2017-11-09 13:37   ` Ulf Hansson
2017-11-03 13:20 ` [PATCH V13 07/10] mmc: block: blk-mq: Add support for direct completion Adrian Hunter
2017-11-08  9:28   ` Linus Walleij
2017-11-09  7:27     ` Adrian Hunter
2017-11-09 12:34       ` Linus Walleij
2017-11-09 15:33         ` Adrian Hunter
2017-11-09 13:07   ` Ulf Hansson
2017-11-09 13:15     ` Adrian Hunter
2017-11-03 13:20 ` [PATCH V13 08/10] mmc: block: blk-mq: Separate card polling from recovery Adrian Hunter
2017-11-08  9:30   ` Linus Walleij
2017-11-09  7:56     ` Adrian Hunter
2017-11-09 12:52       ` Linus Walleij
2017-11-09 13:02         ` Adrian Hunter
2017-11-10  8:25           ` Linus Walleij
2017-11-03 13:20 ` [PATCH V13 09/10] mmc: block: blk-mq: Stop using card_busy_detect() Adrian Hunter
2017-11-09 13:36   ` Ulf Hansson
2017-11-09 15:24     ` Adrian Hunter
2017-11-03 13:20 ` [PATCH V13 10/10] mmc: block: blk-mq: Stop using legacy recovery Adrian Hunter
2017-11-08  9:38   ` Linus Walleij
2017-11-09  7:43     ` Adrian Hunter
2017-11-09 12:45       ` Linus Walleij [this message]
     [not found] ` <CGME20171116094642epcas1p14018cb1c475efa38942109dc24cd6da9@epcas1p1.samsung.com>
2017-11-16  9:46   ` [PATCH V13 00/10] mmc: Add Command Queue support Bartlomiej Zolnierkiewicz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CACRpkdbDWmOTOP1JmriFkpH_rEYJQv17_OhBvNbHY-4Y6m61qA@mail.gmail.com \
    --to=linus.walleij@linaro.org \
    --cc=Yuliy.Izrailov@sandisk.com \
    --cc=adrian.hunter@intel.com \
    --cc=alex.lemberg@sandisk.com \
    --cc=asutoshd@codeaurora.org \
    --cc=dongas86@gmail.com \
    --cc=haibo.chen@nxp.com \
    --cc=hch@lst.de \
    --cc=jh80.chung@samsung.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=mateusz.nowak@intel.com \
    --cc=riteshh@codeaurora.org \
    --cc=shawn.lin@rock-chips.com \
    --cc=stummala@codeaurora.org \
    --cc=ulf.hansson@linaro.org \
    --cc=vbyravarasu@nvidia.com \
    --cc=zhangfei.gao@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).