[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <6F39E573-C325-4D94-ABBE-E869E146B05E@lca.pw>
Date: Thu, 9 Jul 2020 23:26:02 -0400
From: Qian Cai <cai@....pw>
To: Feng Tang <feng.tang@...el.com>
Cc: "Huang, Ying" <ying.huang@...el.com>,
Andi Kleen <andi.kleen@...el.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Michal Hocko <mhocko@...e.com>,
Dennis Zhou <dennis@...nel.org>, Tejun Heo <tj@...nel.org>,
Christoph Lameter <cl@...ux.com>,
kernel test robot <rong.a.chen@...el.com>,
Johannes Weiner <hannes@...xchg.org>,
Matthew Wilcox <willy@...radead.org>,
Mel Gorman <mgorman@...e.de>,
Kees Cook <keescook@...omium.org>,
Luis Chamberlain <mcgrof@...nel.org>,
Iurii Zaikin <yzaikin@...gle.com>, tim.c.chen@...el.com,
dave.hansen@...el.com, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, lkp@...ts.01.org
Subject: Re: [mm] 4e2c82a409: ltp.overcommit_memory01.fail
> On Jul 9, 2020, at 9:38 PM, Feng Tang <feng.tang@...el.com> wrote:
>
> Give it a second thought, my previous way has more indents and lines,
> but it is easier to be understood that we have special handling for
> 'write' case. So I would prefer using it.
>
> Thoughts?
I don’t feel it is easier to understand. I generally prefer to bail out early if possible to also make code a bit more solid for future extensions (once the indentation reached 3+ levels, we will need to rework it).
But, I realize that I have spent too much time debugging than actually writing code those days, so my taste is probably not all that good. Thus, feel free to submit what style you prefer, so other people have more experience coding could review them more.
Powered by blists - more mailing lists