Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1634136
| From | Minchan Kim <minchan@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH -mm -v3] mm, swap: Sort swap entries before free |
| Date | 2017-05-02 07:10 +0200 |
| Message-ID | <tCyet-1Ys-5@gated-at.bofh.it> (permalink) |
| References | (5 earlier) <tB8P7-4n0-1@gated-at.bofh.it> <tB98u-4Ii-17@gated-at.bofh.it> <tBaed-5ps-1@gated-at.bofh.it> <tBczn-6JZ-17@gated-at.bofh.it> <tBehR-7VW-41@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Fri, Apr 28, 2017 at 09:35:37PM +0800, Huang, Ying wrote:
> In fact, during the test, I found the overhead of sort() is comparable
> with the performance difference of adding likely()/unlikely() to the
> "if" in the function.
Huang,
This discussion is started from your optimization code:
if (nr_swapfiles > 1)
sort();
I don't have such fast machine so cannot test it. However, you added
such optimization code in there so I guess it's *worth* to review so
with spending my time, I pointed out what you are missing and
suggested a idea to find a compromise.
Now you are saying sort is so fast so no worth to add more logics
to avoid the overhead?
Then, please just drop that if condition part and instead, sort
it unconditionally.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH -mm -v3] mm, swap: Sort swap entries before free "Huang\, Ying" <ying.huang@intel.com> - 2017-04-26 14:50 +0200
Re: [PATCH -mm -v3] mm, swap: Sort swap entries before free Tim Chen <tim.c.chen@linux.intel.com> - 2017-04-26 22:20 +0200
Re: [PATCH -mm -v3] mm, swap: Sort swap entries before free "Huang\, Ying" <ying.huang@intel.com> - 2017-04-27 03:30 +0200
Re: [PATCH -mm -v3] mm, swap: Sort swap entries before free Tim Chen <tim.c.chen@linux.intel.com> - 2017-04-27 18:50 +0200
Re: [PATCH -mm -v3] mm, swap: Sort swap entries before free Minchan Kim <minchan@kernel.org> - 2017-04-27 06:50 +0200
Re: [PATCH -mm -v3] mm, swap: Sort swap entries before free "Huang\, Ying" <ying.huang@intel.com> - 2017-04-28 03:20 +0200
Re: [PATCH -mm -v3] mm, swap: Sort swap entries before free Minchan Kim <minchan@kernel.org> - 2017-04-28 09:50 +0200
Re: [PATCH -mm -v3] mm, swap: Sort swap entries before free "Huang\, Ying" <ying.huang@intel.com> - 2017-04-28 10:10 +0200
Re: [PATCH -mm -v3] mm, swap: Sort swap entries before free Minchan Kim <minchan@kernel.org> - 2017-04-28 11:20 +0200
Re: [PATCH -mm -v3] mm, swap: Sort swap entries before free "Huang\, Ying" <ying.huang@intel.com> - 2017-04-28 13:50 +0200
Re: [PATCH -mm -v3] mm, swap: Sort swap entries before free "Huang\, Ying" <ying.huang@intel.com> - 2017-04-28 15:40 +0200
Re: [PATCH -mm -v3] mm, swap: Sort swap entries before free Minchan Kim <minchan@kernel.org> - 2017-05-02 07:10 +0200
Re: [PATCH -mm -v3] mm, swap: Sort swap entries before free "Huang\, Ying" <ying.huang@intel.com> - 2017-05-02 07:40 +0200
Re: [PATCH -mm -v3] mm, swap: Sort swap entries before free Minchan Kim <minchan@kernel.org> - 2017-05-02 07:50 +0200
Re: [PATCH -mm -v3] mm, swap: Sort swap entries before free "Huang\, Ying" <ying.huang@intel.com> - 2017-05-02 08:10 +0200
csiph-web