Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1562125
| From | Michal Hocko <mhocko@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [Update][PATCH v5 7/9] mm/swap: Add cache for swap slots allocation |
| Date | 2017-01-18 21:10 +0100 |
| Message-ID | <t14Iq-91-7@gated-at.bofh.it> (permalink) |
| References | (1 earlier) <sYvlL-1rB-23@gated-at.bofh.it> <t0sa5-140-1@gated-at.bofh.it> <t0JNE-3U5-13@gated-at.bofh.it> <t0XQC-49m-1@gated-at.bofh.it> <t12Qi-7py-17@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed 18-01-17 10:03:27, Tim Chen wrote:
> On Wed, Jan 18, 2017 at 01:45:55PM +0100, Michal Hocko wrote:
> > On Tue 17-01-17 13:42:35, Tim Chen wrote:
> > [...]
> > > Logic wise, We do allow pre-emption as per cpu ptr cache->slots is
> > > protected by the mutex cache->alloc_lock. We switch the
> > > inappropriately used this_cpu_ptr to raw_cpu_ptr for per cpu ptr
> > > access of cache->slots.
> >
> > OK, that looks better. I would still appreciate something like the
> > following folded in
> > diff --git a/include/linux/swap_slots.h b/include/linux/swap_slots.h
> > index fb907346c5c6..0afe748453a7 100644
> > --- a/include/linux/swap_slots.h
> > +++ b/include/linux/swap_slots.h
> > @@ -11,6 +11,7 @@
> >
> > struct swap_slots_cache {
> > bool lock_initialized;
> > + /* protects slots, nr, cur */
> > struct mutex alloc_lock;
> > swp_entry_t *slots;
> > int nr;
> >
>
> I've included here a patch for the comments.
Thanks!
--
Michal Hocko
SUSE Labs
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[Update][PATCH v5 7/9] mm/swap: Add cache for swap slots allocation "Huang\, Ying" <ying.huang@intel.com> - 2017-01-17 04:00 +0100
Re: [Update][PATCH v5 7/9] mm/swap: Add cache for swap slots allocation Michal Hocko <mhocko@kernel.org> - 2017-01-17 11:20 +0100
RE: [Update][PATCH v5 7/9] mm/swap: Add cache for swap slots allocation "Chen, Tim C" <tim.c.chen@intel.com> - 2017-01-17 18:30 +0100
RE: [Update][PATCH v5 7/9] mm/swap: Add cache for swap slots allocation "Chen, Tim C" <tim.c.chen@intel.com> - 2017-01-17 21:40 +0100
Re: [Update][PATCH v5 7/9] mm/swap: Add cache for swap slots allocation Michal Hocko <mhocko@kernel.org> - 2017-01-17 23:00 +0100
Re: [Update][PATCH v5 7/9] mm/swap: Add cache for swap slots allocation Tim Chen <tim.c.chen@linux.intel.com> - 2017-01-17 22:50 +0100
Re: [Update][PATCH v5 7/9] mm/swap: Add cache for swap slots allocation Michal Hocko <mhocko@kernel.org> - 2017-01-18 13:50 +0100
Re: [Update][PATCH v5 7/9] mm/swap: Add cache for swap slots allocation Tim Chen <tim.c.chen@linux.intel.com> - 2017-01-18 19:10 +0100
Re: [Update][PATCH v5 7/9] mm/swap: Add cache for swap slots allocation Michal Hocko <mhocko@kernel.org> - 2017-01-18 21:10 +0100
csiph-web