Re: [PATCH] documentation: Fix two-CPU control-dependency example

2017-07-21 Thread Akira Yokosawa
On 2017/07/20 16:07:14 -0700, Paul E. McKenney wrote: > On Fri, Jul 21, 2017 at 07:52:03AM +0900, Akira Yokosawa wrote: >> On 2017/07/20 14:42:34 -0700, Paul E. McKenney wrote: [...] >>> For the compilers I know about at the present time, yes. >> >> So if I respin the patch with the extern, would

Re: [PATCH v2 3/4] fs/dcache: Enable automatic pruning of negative dentries

2017-07-21 Thread James Bottomley
On Fri, 2017-07-21 at 16:17 -0400, Waiman Long wrote: > On 07/21/2017 03:30 PM, James Bottomley wrote: > > > > On Fri, 2017-07-21 at 09:43 -0400, Waiman Long wrote: > > > > > > Having a limit for the number of negative dentries does have an > > > undesirable side effect that no new negative

[PATCH v4 4/5] dax: remove DAX code from page_cache_tree_insert()

2017-07-21 Thread Ross Zwisler
Now that we no longer insert struct page pointers in DAX radix trees we can remove the special casing for DAX in page_cache_tree_insert(). This also allows us to make dax_wake_mapping_entry_waiter() local to fs/dax.c, removing it from dax.h. Signed-off-by: Ross Zwisler

[PATCH v4 2/5] dax: relocate some dax functions

2017-07-21 Thread Ross Zwisler
dax_load_hole() will soon need to call dax_insert_mapping_entry(), so it needs to be moved lower in dax.c so the definition exists. dax_wake_mapping_entry_waiter() will soon be removed from dax.h and be made static to dax.c, so we need to move its definition above all its callers. Signed-off-by:

[PATCH v4 1/5] mm: add mkwrite param to vm_insert_mixed()

2017-07-21 Thread Ross Zwisler
To be able to use the common 4k zero page in DAX we need to have our PTE fault path look more like our PMD fault path where a PTE entry can be marked as dirty and writeable as it is first inserted, rather than waiting for a follow-up dax_pfn_mkwrite() => finish_mkwrite_fault() call. Right now we

[PATCH v4 3/5] dax: use common 4k zero page for dax mmap reads

2017-07-21 Thread Ross Zwisler
When servicing mmap() reads from file holes the current DAX code allocates a page cache page of all zeroes and places the struct page pointer in the mapping->page_tree radix tree. This has three major drawbacks: 1) It consumes memory unnecessarily. For every 4k page that is read via a DAX

[PATCH v4 5/5] dax: move all DAX radix tree defs to fs/dax.c

2017-07-21 Thread Ross Zwisler
Now that we no longer insert struct page pointers in DAX radix trees the page cache code no longer needs to know anything about DAX exceptional entries. Move all the DAX exceptional entry definitions from dax.h to fs/dax.c. Signed-off-by: Ross Zwisler Suggested-by:

[PATCH v4 0/5] DAX common 4k zero page

2017-07-21 Thread Ross Zwisler
Changes since v3: - Rebased onto the current linux/master which is based on v4.13-rc1. - Instead of adding vm_insert_mkwrite_mixed() and duplicating code from vm_insert_mixed(), instead just add a 'mkwrite' parameter to vm_insert_mixed() and update all call sites. (Vivek) - Added a

Re: [PATCH] docs: submitting-patches - change non-ascii character to ascii

2017-07-21 Thread Frank Rowand
On 07/21/17 10:27, Jonathan Corbet wrote: > On Thu, 20 Jul 2017 18:30:55 -0700 > frowand.l...@gmail.com wrote: > >> Documentation/process/submitting-patches.rst contains a non-ascii >> character. Change it to the ascii equivalent. > > You should know better than to tell somebody like me that a

Re: [PATCH v2 3/4] fs/dcache: Enable automatic pruning of negative dentries

2017-07-21 Thread Waiman Long
On 07/21/2017 03:30 PM, James Bottomley wrote: > On Fri, 2017-07-21 at 09:43 -0400, Waiman Long wrote: >> Having a limit for the number of negative dentries does have an >> undesirable side effect that no new negative dentries will be allowed >> when the limit is reached. This will have

Re: [PATCH v2 3/4] fs/dcache: Enable automatic pruning of negative dentries

2017-07-21 Thread James Bottomley
On Fri, 2017-07-21 at 09:43 -0400, Waiman Long wrote: > Having a limit for the number of negative dentries does have an > undesirable side effect that no new negative dentries will be allowed > when the limit is reached. This will have performance implication > for some types of workloads. This

Re: [PATCH v3 1/5] mm: add vm_insert_mixed_mkwrite()

2017-07-21 Thread Ross Zwisler
On Thu, Jul 20, 2017 at 09:59:22AM -0600, Ross Zwisler wrote: > On Thu, Jul 20, 2017 at 11:26:16AM -0400, Vivek Goyal wrote: <> > > Hi Ross, > > > > vm_insert_mixed_mkwrite() is same as vm_insert_mixed() except this sets > > write parameter to inser_pfn() true. Will it make sense to just add > >

Re: [PATCH v3 1/5] mm: add vm_insert_mixed_mkwrite()

2017-07-21 Thread Ross Zwisler
On Wed, Jul 19, 2017 at 03:58:31PM -0600, Ross Zwisler wrote: > On Wed, Jul 19, 2017 at 11:51:12AM -0600, Ross Zwisler wrote: > > On Wed, Jul 19, 2017 at 04:16:59PM +0200, Jan Kara wrote: > > > On Wed 28-06-17 16:01:48, Ross Zwisler wrote: > > > > To be able to use the common 4k zero page in DAX

Re: [PATCH] docs: submitting-patches - change non-ascii character to ascii

2017-07-21 Thread Jonathan Corbet
On Thu, 20 Jul 2017 18:30:55 -0700 frowand.l...@gmail.com wrote: > Documentation/process/submitting-patches.rst contains a non-ascii > character. Change it to the ascii equivalent. You should know better than to tell somebody like me that a hyphen and an m-dash are equivalent! :) I don't have

Re: [RFC v6 27/62] powerpc: helper to validate key-access permissions of a pte

2017-07-21 Thread Ram Pai
On Fri, Jul 21, 2017 at 12:21:50PM +0530, Aneesh Kumar K.V wrote: > Ram Pai writes: > > > On Thu, Jul 20, 2017 at 12:12:47PM +0530, Aneesh Kumar K.V wrote: > >> Ram Pai writes: > >> > >> > helper function that checks if the read/write/execute is

Re: [PATCH] documentation: Fix two-CPU control-dependency example

2017-07-21 Thread Paul E. McKenney
On Fri, Jul 21, 2017 at 08:24:40AM +0800, Boqun Feng wrote: > On Thu, Jul 20, 2017 at 04:07:14PM -0700, Paul E. McKenney wrote: > [...] > > > > > > So if I respin the patch with the extern, would you still feel reluctant? > > > > Yes, because I am not seeing how this change helps. What is this

[PATCH] sphinx-pre-install: add support for Mageia

2017-07-21 Thread Mauro Carvalho Chehab
Add support for detecting and installing missing packages on Mageia. I opted to use "urpmi" at the install instructions, as this is present on Mageia since ever. Yet, if I were using Mageia 6, I would likely be using "dnf", as it is, IMHO, easier to use. Tested with Mageia 6. Signed-off-by:

[PATCH v2 0/4] fs/dcache: Limit # of negative dentries

2017-07-21 Thread Waiman Long
v1->v2: - Move the new nr_negative field to the end of dentry_stat_t structure as suggested by Matthew Wilcox. - With the help of Miklos Szeredi, fix incorrect locking order in dentry_kill() by using lock_parent() instead of locking the parent's d_lock directly. - Correctly

[PATCH v2 1/4] fs/dcache: Limit numbers of negative dentries

2017-07-21 Thread Waiman Long
The number of positive dentries is limited by the number of files in the filesystems. The number of negative dentries, however, has no limit other than the total amount of memory available in the system. So a rogue application that generates a lot of negative dentries can potentially exhaust most

[PATCH v2 2/4] fs/dcache: Report negative dentry number in dentry-state

2017-07-21 Thread Waiman Long
The number of negative dentries currently in the system is now reported in the /proc/sys/fs/dentry-state file. Signed-off-by: Waiman Long --- fs/dcache.c| 16 +++- include/linux/dcache.h | 7 --- 2 files changed, 19 insertions(+), 4 deletions(-)

[PATCH v2 3/4] fs/dcache: Enable automatic pruning of negative dentries

2017-07-21 Thread Waiman Long
Having a limit for the number of negative dentries does have an undesirable side effect that no new negative dentries will be allowed when the limit is reached. This will have performance implication for some types of workloads. So we need a way to prune the negative dentries so that new ones can

[PATCH v2 4/4] fs/dcache: Protect negative dentry pruning from racing with umount

2017-07-21 Thread Waiman Long
The negative dentry pruning is done on a specific super_block set in the ndblk.prune_sb variable. If the super_block is also being un-mounted concurrently, the content of the super_block may no longer be valid. To protect against such racing condition, a new lock is added to the ndblk structure

Re: [RFC v6 27/62] powerpc: helper to validate key-access permissions of a pte

2017-07-21 Thread Aneesh Kumar K.V
Ram Pai writes: > On Thu, Jul 20, 2017 at 12:12:47PM +0530, Aneesh Kumar K.V wrote: >> Ram Pai writes: >> >> > helper function that checks if the read/write/execute is allowed >> > on the pte. >> > >> > Signed-off-by: Ram Pai >> >