Re: [PATCH 1/3] tile/elf: reorganize notify_exec()

From: Chris Metcalf
Date: Mon Mar 16 2015 - 16:06:14 EST


On 2/25/2015 4:58 PM, Davidlohr Bueso wrote:
In the future mm->exe_file will be done without mmap_sem
serialization, thus isolate and reorganize the tile elf
code to make the transition easier. Good users will, make
use of the more standard get_mm_exe_file(), requiring only
holding the mmap_sem to read the value, and relying on reference
counting to make sure that the exe file won't dissappear
underneath us.

The visible effects of this patch are:

o We now take and drop the mmap_sem more often. Instead of
just in arch_setup_additional_pages(), we also do it in:

1) get_mm_exe_file()
2) to get the mm->vm_file and notify the simulator.

[Note that 1) will disappear once we change the locking
rules for exe_file.]

o We avoid getting a free page and doing d_path() while
holding the mmap_sem. This requires reordering the checks.

Cc: Chris Metcalf<cmetcalf@xxxxxxxxxx>
Signed-off-by: Davidlohr Bueso<dbueso@xxxxxxx>
---

completely untested.

arch/tile/mm/elf.c | 47 +++++++++++++++++++++++++++++------------------
1 file changed, 29 insertions(+), 18 deletions(-)

This looks OK to me and passes basic testing. So here is my

Acked-by: Chris Metcalf <cmetcalf@xxxxxxxxxx>

Or would you prefer I took this through the tile tree?

--
Chris Metcalf, EZChip Semiconductor
http://www.ezchip.com

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/