Re: [RFC PATCH] staging, android, ashmem: invalidate pin/unpin ioctl for private map

2012-12-03 Thread JoonSoo Kim
2012/12/3 Dan Carpenter : > On Mon, Dec 03, 2012 at 09:09:59AM +0900, JoonSoo Kim wrote: >> Hello, Dan. >> >> 2012/12/2 Dan Carpenter : >> > On Sat, Dec 01, 2012 at 02:45:57AM +0900, Joonsoo Kim wrote: >> >> @@ -614,21 +616,35 @@ static int ashmem_pin_unpin(struct ashmem_area >> >> *asma,

Re: [RFC PATCH] staging, android, ashmem: invalidate pin/unpin ioctl for private map

2012-12-03 Thread JoonSoo Kim
2012/12/3 Dan Carpenter dan.carpen...@oracle.com: On Mon, Dec 03, 2012 at 09:09:59AM +0900, JoonSoo Kim wrote: Hello, Dan. 2012/12/2 Dan Carpenter dan.carpen...@oracle.com: On Sat, Dec 01, 2012 at 02:45:57AM +0900, Joonsoo Kim wrote: @@ -614,21 +616,35 @@ static int ashmem_pin_unpin(struct

Re: [RFC PATCH] staging, android, ashmem: invalidate pin/unpin ioctl for private map

2012-12-02 Thread Dan Carpenter
On Mon, Dec 03, 2012 at 09:09:59AM +0900, JoonSoo Kim wrote: > Hello, Dan. > > 2012/12/2 Dan Carpenter : > > On Sat, Dec 01, 2012 at 02:45:57AM +0900, Joonsoo Kim wrote: > >> @@ -614,21 +616,35 @@ static int ashmem_pin_unpin(struct ashmem_area > >> *asma, unsigned long cmd, > >> pgstart =

Re: [RFC PATCH] staging, android, ashmem: invalidate pin/unpin ioctl for private map

2012-12-02 Thread JoonSoo Kim
Hello, Dan. 2012/12/2 Dan Carpenter : > On Sat, Dec 01, 2012 at 02:45:57AM +0900, Joonsoo Kim wrote: >> @@ -614,21 +616,35 @@ static int ashmem_pin_unpin(struct ashmem_area *asma, >> unsigned long cmd, >> pgstart = pin.offset / PAGE_SIZE; >> pgend = pgstart + (pin.len / PAGE_SIZE) -

Re: [RFC PATCH] staging, android, ashmem: invalidate pin/unpin ioctl for private map

2012-12-02 Thread JoonSoo Kim
Hello, Dan. 2012/12/2 Dan Carpenter dan.carpen...@oracle.com: On Sat, Dec 01, 2012 at 02:45:57AM +0900, Joonsoo Kim wrote: @@ -614,21 +616,35 @@ static int ashmem_pin_unpin(struct ashmem_area *asma, unsigned long cmd, pgstart = pin.offset / PAGE_SIZE; pgend = pgstart + (pin.len

Re: [RFC PATCH] staging, android, ashmem: invalidate pin/unpin ioctl for private map

2012-12-02 Thread Dan Carpenter
On Mon, Dec 03, 2012 at 09:09:59AM +0900, JoonSoo Kim wrote: Hello, Dan. 2012/12/2 Dan Carpenter dan.carpen...@oracle.com: On Sat, Dec 01, 2012 at 02:45:57AM +0900, Joonsoo Kim wrote: @@ -614,21 +616,35 @@ static int ashmem_pin_unpin(struct ashmem_area *asma, unsigned long cmd,

Re: [RFC PATCH] staging, android, ashmem: invalidate pin/unpin ioctl for private map

2012-12-01 Thread Dan Carpenter
On Sat, Dec 01, 2012 at 02:45:57AM +0900, Joonsoo Kim wrote: > @@ -614,21 +616,35 @@ static int ashmem_pin_unpin(struct ashmem_area *asma, > unsigned long cmd, > pgstart = pin.offset / PAGE_SIZE; > pgend = pgstart + (pin.len / PAGE_SIZE) - 1; > > - mutex_lock(_mutex); > + if

Re: [RFC PATCH] staging, android, ashmem: invalidate pin/unpin ioctl for private map

2012-12-01 Thread Dan Carpenter
On Sat, Dec 01, 2012 at 02:45:57AM +0900, Joonsoo Kim wrote: @@ -614,21 +616,35 @@ static int ashmem_pin_unpin(struct ashmem_area *asma, unsigned long cmd, pgstart = pin.offset / PAGE_SIZE; pgend = pgstart + (pin.len / PAGE_SIZE) - 1; - mutex_lock(ashmem_mutex); + if

[RFC PATCH] staging, android, ashmem: invalidate pin/unpin ioctl for private map

2012-11-30 Thread Joonsoo Kim
Private mapped ashmem doesn't install vm fault handler. So, do_anonymous_page is called for handling fault in handle_pte_fault(). This type of backed memory isn't related to asma->file which is used by ashmem shrinker. Shrinking unpinned area for this mapping will not shrink memory actually.

[RFC PATCH] staging, android, ashmem: invalidate pin/unpin ioctl for private map

2012-11-30 Thread Joonsoo Kim
Private mapped ashmem doesn't install vm fault handler. So, do_anonymous_page is called for handling fault in handle_pte_fault(). This type of backed memory isn't related to asma-file which is used by ashmem shrinker. Shrinking unpinned area for this mapping will not shrink memory actually.