[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <9c5031cb0dfeb6083e65e3b33f4e73b96c66699f.camel@intel.com>
Date: Fri, 7 Sep 2018 08:26:31 +0000
From: "Yang, Bin" <bin.yang@...el.com>
To: "tglx@...utronix.de" <tglx@...utronix.de>
CC: "mingo@...nel.org" <mingo@...nel.org>,
"hpa@...or.com" <hpa@...or.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"peterz@...radead.org" <peterz@...radead.org>,
"Gross, Mark" <mark.gross@...el.com>,
"x86@...nel.org" <x86@...nel.org>,
"Hansen, Dave" <dave.hansen@...el.com>
Subject: Re: [PATCH v3 4/5] x86/mm: optimize static_protection() by using
overlap()
On Fri, 2018-09-07 at 10:21 +0200, Thomas Gleixner wrote:
> On Fri, 7 Sep 2018, Yang, Bin wrote:
> > On Fri, 2018-09-07 at 09:49 +0200, Thomas Gleixner wrote:
> > > On Fri, 7 Sep 2018, Yang, Bin wrote:
> > > > On Tue, 2018-09-04 at 14:22 +0200, Thomas Gleixner wrote:
> > > >
> > > > I just write a test.c to compare the result between overlap() and
> > > > original within().
> > >
> > > You are right. Your version of doing the overlap exclusive works. I misread
> > > the conditions. I still prefer doing inclusive checks because they are way
> > > more obvious.
> >
> > I am sorry for my poor english. What is "inclusive checks"?
>
> Exlusive: val >= start && val < end
>
> Inclusive: val >= start && val <= end
>
> So the difference is that you feed exclusive with:
>
> end = start + size
>
> and inclusive with
>
> end = start + size - 1
>
Thanks. I will change it to inclusive check.
> Thanks,
>
> tglx
>
>
Powered by blists - more mailing lists