Re: [RFC][PATCH] fs: configfs: programmatically create config groups

2012-11-26 Thread Michal Nazarewicz
> On 11/26/2012 09:35 AM, Andrzej Pietrasiewicz wrote: >> In some parts of the kernel (e.g. planned configfs integration into usb >> gadget) there is a need to programmatically create config groups >> (directories) but it would be preferable to disallow creating them by >> the user. This is more or

Re: [RFC][PATCH] fs: configfs: programmatically create config groups

2012-11-26 Thread Michal Nazarewicz
On Mon, Nov 26 2012, Sebastian Andrzej Siewior wrote: > Wouldn't say that. It may adds complexity on another level. The target > subsystem has the same problem with adding luns and there seems nothing > wrong with having lun3 and 4 and leaving 0 and 1 unsued. That's not what Wikipedia claims thoug

RE: [RFC][PATCH] fs: configfs: programmatically create config groups

2012-11-27 Thread Michal Nazarewicz
On Tue, Nov 27 2012, Andrzej Pietrasiewicz wrote: > I think we _still_ need a way to programmatically create/remove configfs > directories. Without it, this: "After name is written it will request > the module and special configuration related files pop up." > (http://www.spinics.net/lists/linux-u

Re: [RFC][PATCH] fs: configfs: programmatically create config groups

2012-11-27 Thread Michal Nazarewicz
On Tue, Nov 27 2012, Sebastian Andrzej Siewior wrote: > I don't want to push python on anyone but the removal magic is simply > straight forward: unlink the disk ports, rmdir luns, tpgt,… How should a generic tool know what kind of actions are needed for given function to be removed? If you ask m

Re: [RFC][PATCH] fs: configfs: programmatically create config groups

2012-11-28 Thread Michal Nazarewicz
> On 11/27/2012 05:23 PM, Michal Nazarewicz wrote: >> How should a generic tool know what kind of actions are needed for given >> function to be removed? If you ask me, there should be a way to unbind >> gadget and unload all modules without any specific knowledge of the &g

Re: [RFC][PATCH] fs: configfs: programmatically create config groups

2012-11-28 Thread Michal Nazarewicz
On Wed, Nov 28 2012, Sebastian Andrzej Siewior wrote: > - > /functions/acm-function/ > > instead of > > /functions/function1/ > +name > with attribute file named "name" which contains the name of the > function (i.e. acm). My point is to keep "name" in

Re: [RFC PATCHv2 1/1] usb: f_rndis: Avoid to use ERROR macro if cdev can be null

2013-03-19 Thread Michal Nazarewicz
adovan Lekanovic > Signed-off-by: Truls Bengtsson > Signed-off-by: Oskar Andero Acked-by: Michal Nazarewicz I think this is the best solution. Adding if statements around it would just add noise. > --- > drivers/usb/gadget/f_rndis.c |3 +-- > 1 files changed, 1 insertions

Re: [PATCH] tools: usb: ffs-test: Fix build failure

2013-02-20 Thread Michal Nazarewicz
test.c:41:0: > ../../include/linux/usb/functionfs.h:4:39: fatal error: > uapi/linux/usb/functionfs.h: No such file or directory > compilation terminated. > make: *** [ffs-test] Error 1 > > Signed-off-by: Maxin B. John Acked-by: Michal Nazarewicz > --- > tools/usb/ffs-tes

Re: [PATCH] tools: usb: ffs-test: Fix build failure

2013-02-20 Thread Michal Nazarewicz
On Thu, Feb 21 2013, Maxin B. John wrote: > Hi, > > On Thu, Feb 21, 2013 at 2:06 AM, Greg KH wrote: >> On Thu, Feb 21, 2013 at 01:57:51AM +0200, maxin.j...@gmail.com wrote: >>> From: "Maxin B. John" >>> >>> Fixes this build failure: >>> gcc -Wall -Wextra -g -lpthread -I../include -o testusb testu

Re: [PATCH] [RFC] usb: gadget: composite: Allow idVendor and other module_params to be writable

2013-02-21 Thread Michal Nazarewicz
; Cc: Sebastian Andrzej Siewior > Cc: Andrzej Pietrasiewicz > Cc: Michal Nazarewicz > Cc: Felipe Balbi > Cc: Greg Kroah-Hartman > Cc: linux-...@vger.kernel.org > Signed-off-by: John Stultz > --- > include/linux/usb/composite.h | 16 ++-- > 1 file cha

Re: [PATCH] [RFC] usb: gadget: composite: Allow idVendor and other module_params to be writable

2013-02-21 Thread Michal Nazarewicz
> On 02/21/2013 02:52 PM, Michal Nazarewicz wrote: >> If the driver is not compiled as a module, setting those variables >> won't work anyway. Or am I missing something? On Fri, Feb 22 2013, John Stultz wrote: > Huh. It worked in my testing. But maybe that's only the

Re: [PATCH] mm: cma: Discard clean pages during contiguous allocation instead of migration

2012-09-11 Thread Michal Nazarewicz
; * drop migrate_mode_t > * add reclaim_clean_pages_from_list instad of MIGRATE_DISCARD support - Mel > > I measured elapsed time of __alloc_contig_migrate_range which migrates > 10M in 40M movable zone in QEMU machine. > > Before - 146ms, After - 7ms > > Cc: Marek Szyprowski >

Re: [RFC] memory-hotplug: remove MIGRATE_ISOLATE from free_area->free_list

2012-09-11 Thread Michal Nazarewicz
On Tue, Sep 11 2012, Minchan Kim wrote: > I saw two bug report about MIGRATE_ISOALTE type and NR_FREE_PAGES accounting > mistmatch problem until now and I think we can meet more problems > in the near future without solving it. > > Maybe, [1] would be a solution but I really don't like to add new b

Re: [PATCH 1/2] mm: refactor out __alloc_contig_migrate_alloc

2012-09-12 Thread Michal Nazarewicz
On Wed, Sep 12 2012, Minchan Kim wrote: > __alloc_contig_migrate_alloc can be used by memory-hotplug so > refactor out(move + rename as a common name) it into > page_isolation.c. > > Cc: Kamezawa Hiroyuki > Cc: Yasuaki Ishimatsu > Cc: Michal Nazarewicz Acked-by: Mic

Re: [PATCH 2/2] memory-hotplug: don't replace lowmem pages with highmem

2012-09-12 Thread Michal Nazarewicz
> (ret_fast_syscall+0x0/0x30) > " > > Memory-hotplug has same problem with CMA so [1]'s fix could be applied > with memory-hotplug, too. > > Fix it by reusing. > > [1] 6a6dccba2, mm: cma: don't replace lowmem pages with highmem > > Cc: Kamezawa Hir

Re: [PATCH] usb/gadget: let file storage gadget select libcomposite

2012-10-24 Thread Michal Nazarewicz
x27; > > Signed-off-by: Sebastian Andrzej Siewior At first it looks strange as FSG does not use composite, but yeah: Acked-by: Michal Nazarewicz > --- > for v3.7 please. > > drivers/usb/gadget/Kconfig |1 + > 1 file changed, 1 insertion(+) > > diff --git a/driver

Re: [PATCH] usb/gadget: let file storage gadget select libcomposite

2012-10-24 Thread Michal Nazarewicz
> On Wed, Oct 24, 2012 at 07:30:42PM +0200, Michal Nazarewicz wrote: >> At first it looks strange as FSG does not use composite, but yeah: On Wed, Oct 24 2012, Sebastian Andrzej Siewior wrote: > Yeah. However, it should be removed in v3.8 anyway :) Yep, that's what feature-rem

Re: [PATCH] usb/gadget: let file storage gadget select libcomposite

2012-10-31 Thread Michal Nazarewicz
On Wed, Oct 31 2012, Felipe Balbi wrote: > nevertheless, I should be receiving a patch right about now removing > that file. Alan, care to send a patch for that ? I have some other stuff to remove as well, so I can take care of it, so Alan can spend his time on something more important. -- Best

Re: [PATCH 1/4] lib: vsprintf: Optimize division by 10 for small integers.

2012-09-23 Thread Michal Nazarewicz
On Fri, Aug 03 2012, George Spelvin wrote: > Shrink the reciprocal approximations used in put_dec_full4 > based on the comments in put_dec_full9. > > Signed-off-by: George Spelvin > Cc: Denys Vlasenko > Cc: Michal Nazarewicz Have you verified that the comment is corr

Re: [PATCH 2/4] lib: vsprintf: Optimize division by 10000

2012-09-23 Thread Michal Nazarewicz
On Fri, Aug 03 2012, George Spelvin wrote: > The same multiply-by-inverse technique can be used to > convert division by 1 to a 32x32->64-bit multiply. > > Signed-off-by: George Spelvin You are using a 64-bit multiply in a path that is designed for 32-bit processors, which makes me feel that

Re: [PATCH 3/4] lib: vsprintf: Optimize put_dec_trunc8

2012-09-23 Thread Michal Nazarewicz
On Fri, Aug 03 2012, George Spelvin wrote: > If you're going to have a conditional branch after > each 32x32->64-bit multiply, might as well shrink the code > and make it a loop. > > This also avoids using the long multiply for small integers. > > (This leaves the comments in a confusing state, but

Re: [PATCH 3/4] lib: vsprintf: Optimize put_dec_trunc8

2012-09-24 Thread Michal Nazarewicz
>>> @@ -174,20 +174,12 @@ char *put_dec_trunc8(char *buf, unsigned r) >>> unsigned q; >>> /* Copy of previous function's body with added early returns */ >>> - q = (r * (uint64_t)0x199a) >> 32; >>> - *buf++ = (r - 10 * q) + '0'; /* 2 */ >>> - if (q == 0) >>> - retur

Re: [PATCH 2/4] lib: vsprintf: Optimize division by 10000

2012-09-24 Thread Michal Nazarewicz
On Mon, Sep 24 2012, George Spelvin wrote: >> You are using a 64-bit multiply in a path that is designed for 32-bit >> processors, which makes me feel that it will be slower. > > Slower than the divide it's replacing? OK, granted, it might be faster after all. ;) Still, I'd love to see some bench

Re: [PATCH 3/4] lib: vsprintf: Optimize put_dec_trunc8

2012-09-24 Thread Michal Nazarewicz
*buf++ = q - 10*r; > } > > - if (r == 0) > - return buf; > q = (r * 0x199a) >> 16;/* r <= */ > *buf++ = (r - 10 * q) + '0'; > if (q == 0) > > Inspired by Michal Nazarewicz, I have some ide

Re: [PATCH 3/4] lib: vsprintf: Optimize put_dec_trunc8

2012-09-24 Thread Michal Nazarewicz
On Mon, Sep 24 2012, Michal Nazarewicz wrote: > Ah, right. I also thought about that first but than started worrying > that it could produce unnecessary zeros if the loop iterates at least > once and exits with r being zero, but now I see that this cannot happen > since if the loop c

Re: [PATCH 3/4] lib: vsprintf: Optimize put_dec_trunc8

2012-09-24 Thread Michal Nazarewicz
On Mon, Sep 24 2012, George Spelvin wrote: > Michal Nazarewicz wrote: >> static noinline_for_stack >> char *put_dec_trunc8(char *buf, unsigned r) { >> unsigned q; >> >> if (r > 1) { >> do { >> q = r +

Re: [PATCH] USB: gadget: f_fs: fix error handling

2013-09-27 Thread Michal Nazarewicz
bert Baldyga Acked-by: Michal Nazarewicz > --- > drivers/usb/gadget/f_fs.c |3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/usb/gadget/f_fs.c b/drivers/usb/gadget/f_fs.c > index 1a66c5b..fe7d532 100644 > --- a/drivers/usb/gadget/f_fs.c > +++ b/dri

Re: [PATCH v2] USB: gadget: f_fs: fix error handling

2013-09-30 Thread Michal Nazarewicz
issing error check in ffs_func_bind() function, after > ffs_do_descs() function call for high speed descriptors. Without this check > it's possible that the module will try to dereference incorrect pointer. > > Signed-off-by: Robert Baldyga Acked-by: Michal Nazarewicz > Changelo

Re: [PATCH][RFC] Fix breakage in ffs_fs_mount()

2013-09-20 Thread Michal Nazarewicz
On Fri, Sep 20 2013, Al Viro wrote: > There's a bunch of failure exits in ffs_fs_mount() with > seriously broken recovery logics. Most of that appears to stem > from misunderstanding of the ->kill_sb() semantics; That sounds likely. […] > Signed-off-by: Al Vir

Re: [PATCH 1/2] mm: change enum migrate_mode with bitwise type

2012-09-05 Thread Michal Nazarewicz
an > Suggested-by: Michal Nazarewicz > Signed-off-by: Minchan Kim Acked-by: Michal Nazarewicz -- Best regards, _ _ .o. | Liege of Serenely Enlightened Majesty of o' \,=./ `o ..o | Computer Science, Michał “mina86” Nazarewicz(o

Re: [PATCH 2/2] mm: support MIGRATE_DISCARD

2012-09-05 Thread Michal Nazarewicz
migration is very important rather > than eviction of background processes's workingset. In addition, it needs > less free pages for migration targets so it could avoid memory reclaiming > to get free pages, which is another factor increase latency. > > Cc: Marek Szyprowski > C

Re: [RFC] memory-hotplug: remove MIGRATE_ISOLATE from free_area->free_list

2012-09-05 Thread Michal Nazarewicz
On Wed, Sep 05 2012, Minchan Kim wrote: > Normally, MIGRATE_ISOLATE type is used for memory-hotplug. > But it's irony type because the pages isolated would exist > as free page in free_area->free_list[MIGRATE_ISOLATE] so people > can think of it as allocatable pages but it is *never* allocatable. >

Re: [RFC v2] memory-hotplug: remove MIGRATE_ISOLATE from free_area->free_list

2012-09-06 Thread Michal Nazarewicz
On Thu, Sep 06 2012, Minchan Kim wrote: > Normally, MIGRATE_ISOLATE type is used for memory-hotplug. > But it's irony type because the pages isolated would exist > as free page in free_area->free_list[MIGRATE_ISOLATE] so people > can think of it as allocatable pages but it is *never* allocatable. >

Re: [RFC v2] memory-hotplug: remove MIGRATE_ISOLATE from free_area->free_list

2012-09-06 Thread Michal Nazarewicz
On Thu, Sep 06 2012, Lai Jiangshan wrote: > +found: > + next_pfn = page_to_pfn(page); > + list_for_each_entry_from(page, &isolated_pages, lru) { > + if (page_to_pfn(page) != next_pfn) > + return false; > + pfn = page_to_pfn(page); +

Re: [RFC v2] memory-hotplug: remove MIGRATE_ISOLATE from free_area->free_list

2012-09-06 Thread Michal Nazarewicz
>> +pfn = page_to_pfn(page); >> +if (pfn >= end_pfn) >> +return false; >> +if (pfn >= start_pfn) >> +goto found; On Thu, Sep 06 2012, Lai Jiangshan wrote: > this test is wrong. > > use this: > > if ((pfn <= start_pfn) && (

Re: [RFC] memory-hotplug: remove MIGRATE_ISOLATE from free_area->free_list

2012-09-06 Thread Michal Nazarewicz
> On Wed, Sep 05, 2012 at 07:28:23PM +0200, Michal Nazarewicz wrote: >> If you ask me, I'm not convinced that this improves anything. On Thu, Sep 06 2012, Minchan Kim wrote: > At least, it removes MIGRATE_ISOLATE type in free_area->free_list > which is very irony type a

Re: [PATCH] drivers: cma: fix addressing on PAE machines

2012-11-30 Thread Michal Nazarewicz
On Fri, Nov 30 2012, Vitaly Andrianov wrote: > This patch fixes a couple of bugs that otherwise impair CMA functionality on > PAE machines: > > - alignment must be a 64-bit type when running on systems with 64-bit > physical addresses. If this is not the case, the limit calculation thunks

RE: [PATCH] drivers: cma: fix addressing on PAE machines

2012-11-30 Thread Michal Nazarewicz
>> On Fri, Nov 30 2012, Vitaly Andrianov wrote: >> > This patch fixes a couple of bugs that otherwise impair CMA >> > functionality on PAE machines: >> > >> > - alignment must be a 64-bit type when running on systems with 64- >> bit >> > physical addresses. If this is not the case, the limi

Re: [PATCH v2] drivers: cma: fix addressing on PAE machines

2012-12-03 Thread Michal Nazarewicz
italy Andrianov > Signed-off-by: Cyril Chemparathy Acked-by: Michal Nazarewicz > diff --git a/drivers/base/dma-contiguous.c b/drivers/base/dma-contiguous.c > index 9a14694..097dd44 100644 > --- a/drivers/base/dma-contiguous.c > +++ b/drivers/base/dma-contiguous.c > @@ -60,8 +60,

Re: [linux-keystone] [PATCH v2] drivers: cma: fix addressing on PAE machines

2012-12-04 Thread Michal Nazarewicz
> On Monday 03 December 2012 09:16 PM, Vitaly Andrianov wrote: >> This patch fixes a couple of bugs that otherwise impair CMA functionality on >> PAE machines: >> >>- alignment must be a 64-bit type when running on systems with 64-bit >> physical addresses. If this is not the case, the li

Re: [linux-keystone] [PATCH v2] drivers: cma: fix addressing on PAE machines

2012-12-04 Thread Michal Nazarewicz
> On Tuesday 04 December 2012 06:37 PM, Michal Nazarewicz wrote: >> They are all related to the very same issue, and what the whole patch >> does is change the type used to store physical addresses from unsigned >> long to phys_addr_t. This is really a single change. On Tue,

Re: [PATCH] mm: cma: WARN if freed memory is still in use

2012-11-12 Thread Michal Nazarewicz
On Mon, Nov 12 2012, Marek Szyprowski wrote: > Memory return to free_contig_range() must have no other references. Let > kernel to complain loudly if page reference count is not equal to 1. > diff --git a/mm/page_alloc.c b/mm/page_alloc.c > index 022e4ed..290c2eb 100644 > --- a/mm/page_alloc.c > +

Re: [PATCH] mm: use migrate_prep() instead of migrate_prep_local()

2012-11-12 Thread Michal Nazarewicz
es which got stuck at per-cpu lru list might get missed by > migration procedure causing the contiguous allocation to fail. > > Reported-by: SeongHwan Yoon > Signed-off-by: Marek Szyprowski > Signed-off-by: Kyungmin Park Acked-by: Michal Nazarewicz > --- > mm/page_alloc

Re: [PATCH v2] mm: cma: WARN if freed memory is still in use

2012-11-13 Thread Michal Nazarewicz
On Tue, Nov 13 2012, Marek Szyprowski wrote: > Memory returned to free_contig_range() must have no other references. Let > kernel to complain loudly if page reference count is not equal to 1. > > Signed-off-by: Marek Szyprowski > Reviewed-by: Kyungmin Park > CC: Michal Naz

Re: [PATCH] mm: Remove unused variable in alloc_contig_range()

2012-11-13 Thread Michal Nazarewicz
On Mon, Nov 12 2012, Thierry Reding wrote: > Commit 872ca38f7afd9566bf2f88b95616f7ab71b50064 removed the last > reference to this variable but not the variable itself. > > Signed-off-by: Thierry Reding Acked-by: Michal Nazarewicz I could have sworn that someone (Marek?) sent that p

Re: [PATCH] cma: use unsigned type for count argument

2012-12-26 Thread Michal Nazarewicz
> On Sat, 22 Dec 2012, Michal Nazarewicz wrote: >> So I think just adding the following, should be sufficient to make >> everyone happy: >> >> diff --git a/drivers/base/dma-contiguous.c b/drivers/base/dma-contiguous.c >> index e34e3e0..e91743b 100644 >&

[PATCH] cma: use unsigned type for count argument

2012-12-19 Thread Michal Nazarewicz
From: Michal Nazarewicz Specifying negative size of buffer makes no sense and thus this commit changes the type of the count argument to unsigned. Signed-off-by: Michal Nazarewicz --- arch/arm/mm/dma-mapping.c | 12 ++-- drivers/base/dma-contiguous.c |6 +++--- include

Re: [PATCH] mm: compare MIGRATE_ISOLATE selectively

2012-12-20 Thread Michal Nazarewicz
On Thu, Dec 20 2012, Minchan Kim wrote: > diff --git a/include/linux/page-isolation.h b/include/linux/page-isolation.h > index a92061e..4ada4ef 100644 > --- a/include/linux/page-isolation.h > +++ b/include/linux/page-isolation.h > @@ -1,6 +1,25 @@ > #ifndef __LINUX_PAGEISOLATION_H > #define __LIN

Re: [PATCH] mm: compare MIGRATE_ISOLATE selectively

2012-12-21 Thread Michal Nazarewicz
> On Thu, Dec 20, 2012 at 04:49:44PM +0100, Michal Nazarewicz wrote: >> Perhaps “is_migrate_isolate” to match already existing “is_migrate_cma”? On Fri, Dec 21 2012, Minchan Kim wrote: > Good poking. In fact, while I made this patch, I was very tempted by renaming > is

Re: [PATCH] cma: use unsigned type for count argument

2012-12-22 Thread Michal Nazarewicz
On Fri, Dec 21 2012, David Rientjes wrote: > > Specifying negative size of buffer makes no sense and thus this commit > > changes the type of the count argument to unsigned. > > > > --- a/arch/arm/mm/dma-mapping.c > > +++ b/arch/arm/mm/dma-mapping.c > > @@ -1038,9 +1038,9 @@ static struct page **_

Re: [PATCH] mm: cma: allocate pages from CMA if NR_FREE_PAGES approaches low water mark

2012-11-20 Thread Michal Nazarewicz
patch (not tested): - >8 - >From 790a3b5743414f2770e413e5e8866679de2920b4 Mon Sep 17 00:00:00 2001 Message-Id: <790a3b5743414f2770e413e5e8866679de2920b4.1353425911.git.min...@mina86.com> From: Michal Nazarewicz Date: Tue, 20 Nov 2012 1

Re: [Part3 PATCH v2 1/4] bootmem, mem-hotplug: Register local pagetable pages with LOCAL_NODE_DATA when freeing bootmem.

2013-06-13 Thread Michal Nazarewicz
On Thu, Jun 13 2013, Tang Chen wrote: > As Yinghai suggested, even if a node is movable node, which has only > ZONE_MOVABLE, pagetables should be put in the local node. > > In memory hot-remove logic, it offlines all pages first, and then > removes pagetables. But the local pagetable pages cannot b

Re: [PATCH 1/1] module: fix sprintf format specifier in param_get_byte()

2013-08-07 Thread Michal Nazarewicz
t; is not intended here. Use "%hhu" instead. >> >> Signed-off-by: Christoph Jaeger Acked-by: Michal Nazarewicz for g_ffs.c: > drivers/usb/gadget/g_ffs.c:95:module_param_named(bDeviceClass, > gfs_dev_desc.bDeviceClass,byte, 0644); > drivers/usb/gadget/g_ffs.c:97

Re: [PATCH] tools/usb: adapt ffs-test.c to new layout of includes (UAPI)

2013-03-01 Thread Michal Nazarewicz
On Fri, Mar 01 2013, Andrzej Pietrasiewicz wrote: This fix has already been mailed: https://patchwork.kernel.org/patch/2169791/ > Signed-off-by: Andrzej Pietrasiewicz > Signed-off-by: Kyungmin Park > --- > tools/usb/ffs-test.c |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > d

Re: [PATCH] usb/gadget: initialize gadget functions helper befor functions & gadgets

2013-03-04 Thread Michal Nazarewicz
orrect order but if we compile it into the kernel we rely on > Makefile order which I did wrong and now I correct this. > > Cc: Fengguang Wu Should that be Reported-by? > Signed-off-by: Sebastian Andrzej Siewior Acked-by: Michal Nazarewicz > --- > I kinda assumed that this w

Re: [PATCH] usb: gadget: multi: Mark {cdc,rndis}_config_register() __init

2013-04-24 Thread Michal Nazarewicz
egister() with the __init annotation to kill the > warning. > > Signed-off-by: Geert Uytterhoeven Acked-by: Michal Nazarewicz With transition to configfs all those __inits and __refs will probably go away in the long term though. > --- > Note: I did not verify that multi_bind() i

Re: [PATCH 2/2] dma-buf: add helpers for attacher dma-parms

2012-08-06 Thread Michal Nazarewicz
Tomasz Stanislawski writes: > I recommend to change the semantics for unlimited number of segments > from 'value 0' to: > > #define DMA_SEGMENTS_COUNT_UNLIMITED ((unsigned long)INT_MAX) > > Using INT_MAX will allow using safe conversions between signed and > unsigned integers. LONG_MAX seems cle

Re: [RFC] mm: support MIGRATE_DISCARD

2012-08-24 Thread Michal Nazarewicz
is very important rather > than eviction of background processes's workingset. In addition, it needs > less free pages for migration targets so it could avoid memory reclaiming > to get free pages, which is another factor increase latency. > > Cc: Marek Szyprowski > Cc: Michal N

Re: [PATCH] mm: cma: fix alignment requirements for contiguous regions

2012-08-24 Thread Michal Nazarewicz
DER-1). This patch relaxes alignment > requirements by one order, because MAX_ORDER alignment is not really > needed. > > Signed-off-by: Marek Szyprowski > CC: Michal Nazarewicz Acked-by: Michal Nazarewicz > --- > drivers/base/dma-contiguous.c |2 +- > 1 files c

[PATCH] usb: gadget: get rid of USB_GADGET_{DUAL,SUPER}SPEED

2012-08-24 Thread Michal Nazarewicz
From: Michal Nazarewicz This commit removes USB_GADGET_DUALSPEED and USB_GADGET_SUPERSPEED Kconfig options. Since now kernel allows many UDC drivers to be compiled, those options may turn to no longer be valid. For instance, if someone decides to build UDC that supports super speed and UDC

Re: [RFC 2/2] cma: support MIGRATE_DISCARD

2012-08-14 Thread Michal Nazarewicz
Minchan Kim writes: > This patch introudes MIGRATE_DISCARD mode in migration. > It drop clean cache pages instead of migration so that > migration latency could be reduced. Of course, it could > evict code pages but latency of big contiguous memory > is more important than some background applicat

Re: [RFC 2/2] cma: support MIGRATE_DISCARD

2012-08-16 Thread Michal Nazarewicz
> On Tue, Aug 14, 2012 at 04:19:55PM +0200, Michal Nazarewicz wrote: >> Since CMA is the only user of MIGRATE_DISCARD it may be worth it to >> guard it inside an #ifdef, eg: Minchan Kim writes: > In summary, I want to open it for potential usecases in future if anyone > do

Re: [PATCH 04/13] rbtree: move some implementation details from rbtree.h to rbtree.c

2012-07-10 Thread Michal Nazarewicz
On Tue, 10 Jul 2012 01:35:14 +0200, Michel Lespinasse wrote: rbtree users must use the documented APIs to manipulate the tree structure. Low-level helpers to manipulate node colors and parenthood are not part of that API, so move them to lib/rbtree.c Signed-off-by: Michel Lespinasse --- inc

Re: [PATCH 05/13] rbtree: performance and correctness test

2012-07-10 Thread Michal Nazarewicz
On Tue, 10 Jul 2012 01:35:15 +0200, Michel Lespinasse wrote: This small module helps measure the performance of rbtree insert and erase. Additionally, we run a few correctness tests to check that the rbtrees have all desired properties: - contains the right number of nodes in the order desired

Re: [PATCH 0/6] USB: serial: Changes to conform with checkpatch.

2012-07-11 Thread Michal Nazarewicz
On Wed, 11 Jul 2012 16:10:14 +0200, Ben Minerds wrote: Removed various checkpatch.sh warnings and errors. You've meant chekpatch.pl, right? Split patch by warning/error type. Corrected line wraps in emails. Signed-off-by: Ben Minerds This 0/6 also confuses me -- like Greg have said the 0

Re: [PATCH 04/13] rbtree: move some implementation details from rbtree.h to rbtree.c

2012-07-11 Thread Michal Nazarewicz
On Wed, 11 Jul 2012 01:12:54 +0200, Michel Lespinasse wrote: On Tue, Jul 10, 2012 at 5:19 AM, Michal Nazarewicz wrote: On Tue, 10 Jul 2012 01:35:14 +0200, Michel Lespinasse wrote: +#defineRB_RED 0 +#defineRB_BLACK1 Interestingly, those are almost never

Re: [PATCH] mm: cma: allocate pages from CMA if NR_FREE_PAGES approaches low water mark

2012-11-21 Thread Michal Nazarewicz
On Wed, Nov 21 2012, Minchan Kim wrote: > So your concern is that too many free pages in MIGRATE_CMA when OOM happens > is odd? It's natural with considering CMA design which kernel never fallback > non-movable page allocation to CMA area. I guess it's not a your concern. > > Let's think below extr

Re: [RFC][PATCH] fs: configfs: programmatically create config groups

2012-11-26 Thread Michal Nazarewicz
On Mon, Nov 26 2012, Andrzej Pietrasiewicz wrote: > In some parts of the kernel (e.g. planned configfs integration into usb > gadget) there is a need to programmatically create config groups > (directories) but it would be preferable to disallow creating them by > the user. This is more or less wh

Re: [PATCH v2 1/2] Fix wrong EOF compare

2013-01-11 Thread Michal Nazarewicz
o unexpected results when the variable is used to compare > with EOF(-1). It happens my ARM system and this patch fixes it. > > Cc: Mel Gorman > Cc: Andy Whitcroft > Cc: Alexander Nyberg > Cc: Michal Nazarewicz Acked-by: Michal Nazarewicz > Cc: Randy Dun

Re: [PATCH v2 2/2] Enhance read_block of page_owner.c

2013-01-11 Thread Michal Nazarewicz
one by one until meeting two newline. > It's not good for the performance and current code isn't good shape > for readability. > > This patch enhances speed and clean up. > > Cc: Mel Gorman > Cc: Andy Whitcroft > Cc: Alexander Nyberg > Cc: Randy Dunlap > Signe

Re: [PATCH v2 2/2] Enhance read_block of page_owner.c

2013-01-14 Thread Michal Nazarewicz
On Mon, Jan 14 2013, Minchan Kim wrote: > I'm not familar with Python but I can see the point of the program. > It's very short and good for maintainace but I have a concern about the size. > For working it in embedded side, we have to port python in that > machine. :( [...] > In case of that, ju

Re: [PATCH v2] mm: remove MIGRATE_ISOLATE check in hotpath

2013-01-15 Thread Michal Nazarewicz
et's not add unnecessary > overhead and code when we don't enable CONFIG_MEMORY_ISOLATION. > > Cc: KOSAKI Motohiro > Cc: Michal Nazarewicz Acked-by: Michal Nazarewicz > Signed-off-by: Minchan Kim > --- > include/linux/mmzone.h |2 ++ > include/linux/pag

Re: [PATCH] mm: compaction: fix echo 1 > compact_memory return error issue

2013-01-06 Thread Michal Nazarewicz
On Sun, Jan 06 2013, Simon Jeons wrote: >> >write(1, "1\n", 2) = 3 >> Here it tells it. > On Sun, 2013-01-06 at 08:48 +, Liu Hui-R64343 wrote: > Why this value trouble you? Because write() is supposed to return the number of bytes successfully written. -- Best regard

Re: [PATCH] usb: gadget: FunctionFS: Fix missing braces in parse_opts

2013-01-09 Thread Michal Nazarewicz
d/kgid where appropriate) in 3.7. > > Signed-off-by: Benoit Goby Acked-by: Michal Nazarewicz Cc: sta...@kernel.org > --- > drivers/usb/gadget/f_fs.c |6 +++--- > 1 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/usb/gadget/f_fs.c b/drivers/

[PATCH 1/2] usb: gadget: FunctionFS: Use kstrtoul()

2013-01-09 Thread Michal Nazarewicz
From: Michal Nazarewicz kstrtoul() checks for overflow which simple_strtoul() does not pluss it has “*end == 0” check in it as well. As a side effect, a new line character is now accepted, but this should not be an issue. Signed-off-by: Michal Nazarewicz --- Patch on top of v3.5 with Benoit

[PATCH 2/2] usb: gadget: FunctionFS: Refactor option parsing

2013-01-09 Thread Michal Nazarewicz
From: Michal Nazarewicz The use of memcmp() is clever and all and maybe even it makes parsing a bit faster (since only options with given length need to be checked) but option parsing is hardly a critical path and the additional code complexity is not worth it. Signed-off-by: Michal Nazarewicz

Re: [PATCH] Fix wrong EOF compare

2013-01-10 Thread Michal Nazarewicz
On Thu, Jan 10 2013, Minchan Kim wrote: > getc returns "int" so EOF could be -1 but storing getc's return > value to char directly makes the vaule to 255 so below condition > is always false. Technically, this is implementation defined and I believe on many systems char is signed thus the loop wi

Re: [PATCH] usb: gadget: f_fs: use complete() instead complete_all()

2016-09-22 Thread Michal Nazarewicz
; Signed-off-by: Daniel Wagner > Cc: Felipe Balbi > Cc: Michal Nazarewicz Acked-by: Michal Nazarewicz > Cc: Greg Kroah-Hartman > Cc: linux-...@vger.kernel.org > --- > drivers/usb/gadget/function/f_fs.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff

Re: [PATCH 4/9] usb: gadget: f_midi: defaults buflen sizes to 512

2016-07-27 Thread Michal Nazarewicz
On Tue, Jul 26 2016, Felipe F. Tonello wrote: > 512 is the value used by wMaxPacketSize, as specified by the USB Spec. This > makes sure this driver uses, by default, the most optimal value for IN and OUT > endpoint requests. > > Signed-off-by: Felipe F. Tonello Acked-by: Mi

Re: [PATCH 1/9] usb: gadget: fix usb_ep_align_maybe endianness and new usb_ep_align

2016-07-27 Thread Michal Nazarewicz
ich does always returns the > aligned buffer size for an endpoint. This is useful to be used by USB requests > allocator functions. > > Signed-off-by: Felipe F. Tonello Acked-by: Michal Nazarewicz > --- > include/linux/usb/gadget.h | 17 ++--- > 1 file ch

Re: [PATCH 2/9] usb: gadget: align buffer size when allocating for OUT endpoint

2016-07-27 Thread Michal Nazarewicz
On Tue, Jul 26 2016, Felipe F. Tonello wrote: > Using usb_ep_align() makes sure that the buffer size for OUT endpoints is > always aligned with wMaxPacketSize (512 usually). This makes sure > that no buffer has the wrong size, which can cause nasty bugs. > > Signed-off-by: Felipe F. Tonello > ---

Re: [PATCH 7/9] usb: gadget: remove useless parameter in alloc_ep_req()

2016-07-27 Thread Michal Nazarewicz
me. > create an inline function to pass the same value to len and default_len. > > So this patch also removes duplicate code from few drivers. > > Signed-off-by: Felipe F. Tonello Acked-by: Michal Nazarewicz > --- > drivers/usb/gadget/function/f_hid.c| 10 ++--

Re: [PATCH 8/9] usb: gadget: f_hid: use free_ep_req()

2016-07-27 Thread Michal Nazarewicz
On Tue, Jul 26 2016, Felipe F. Tonello wrote: > We should always use free_ep_req() when allocating requests with > alloc_ep_req(). > > Signed-off-by: Felipe F. Tonello Acked-by: Michal Nazarewicz > --- > drivers/usb/gadget/function/f_hid.c | 10 +++--- > 1 file change

Re: [PATCH 9/9] usb: gadget: f_hid: use alloc_ep_req()

2016-07-27 Thread Michal Nazarewicz
On Tue, Jul 26 2016, Felipe F. Tonello wrote: > Use gadget's framework allocation function instead of directly calling > usb_ep_alloc_request(). > > Signed-off-by: Felipe F. Tonello Acked-by: Michal Nazarewicz > --- > drivers/usb/gadget/function/f_hid.c | 6 +---

Re: [PATCH v3 1/9] usb: gadget: fix usb_ep_align_maybe endianness and new usb_ep_align

2016-08-06 Thread Michal Nazarewicz
ich does always returns the > aligned buffer size for an endpoint. This is useful to be used by USB requests > allocator functions. > > Signed-off-by: Felipe F. Tonello Acked-by: Michal Nazarewicz > --- > include/linux/usb/gadget.h | 17 ++--- > 1 file ch

Re: [PATCH v3 4/9] usb: gadget: f_midi: defaults buflen sizes to 512

2016-08-06 Thread Michal Nazarewicz
On Fri, Aug 05 2016, Felipe F. Tonello wrote: > 512 is the value used by wMaxPacketSize, as specified by the USB Spec. This > makes sure this driver uses, by default, the most optimal value for IN and OUT > endpoint requests. > > Signed-off-by: Felipe F. Tonello Acked-by: Mi

Re: [RFC PATCH 3/3] mm/map_contig: Add mmap(MAP_CONTIG) support

2017-10-16 Thread Michal Nazarewicz
On Sun, Oct 15 2017, Guy Shattah wrote: > Why have several driver specific implementation if you can generalize > the idea and implement an already existing POSIX standard? Why is there a need for contiguous allocation? CPU cares only to the point of huge pages and there’s already an effort in th

Re: [RFC PATCH 3/3] mm/map_contig: Add mmap(MAP_CONTIG) support

2017-10-17 Thread Michal Nazarewicz
On Tue, Oct 17 2017, Guy Shattah wrote: > Are you going to be OK with kernel API which implements contiguous > memory allocation? Possibly with mmap style? Many drivers could > utilize it instead of having their own weird and possibly non-standard > way to allocate contiguous memory. Such API wo

Re: [PATCH] usb/gadget/snps_udc_core: Convert timers to use timer_setup()

2017-10-17 Thread Michal Nazarewicz
t be called, so there is no > reason to make del_timer_sync() calls conditional. As a result, use of > the .data field can be dropped, in support of making removing this field > entirely from struct timer_list. > > Cc: Felipe Balbi > Cc: Greg Kroah-Hartman > Cc: Raviteja Garimella

Re: [PATCH] usb: gadget: f_fs: use memdup_user

2017-05-14 Thread Michal Nazarewicz
On Sat, May 13 2017, Geliang Tang wrote: > Use memdup_user() helper instead of open-coding to simplify the code. > > Signed-off-by: Geliang Tang Acked-by: Michal Nazarewicz > --- > drivers/usb/gadget/function/f_fs.c | 11 +++ > 1 file changed, 3 insertions(+), 8 del

Re: [PATCH] CMA: add the amount of cma memory in meminfo

2014-12-04 Thread Michal Nazarewicz
On Thu, Dec 04 2014, Xishi Qiu wrote: > Add the amount of cma memory in the following meminfo. > /proc/meminfo > /sys/devices/system/node/nodeXX/meminfo > > Signed-off-by: Xishi Qiu > --- > drivers/base/node.c | 16 ++-- > fs/proc/meminfo.c | 12 +--- > 2 files changed, 19

Re: [PATCH] CMA: add the amount of cma memory in meminfo

2014-12-05 Thread Michal Nazarewicz
On Thu, Dec 04 2014, Xishi Qiu wrote: > Add the amount of cma memory in the following meminfo. > /proc/meminfo > /sys/devices/system/node/nodeXX/meminfo > > Signed-off-by: Xishi Qiu No second look: Acked-by: Michal Nazarewicz > --- > drivers/base/node.c | 16 ++

Re: [PATCH v3] usb: gadget: ffs: Fix sparse error

2014-12-24 Thread Michal Nazarewicz
? -EFAULT : n * sizeof(*events); > + kfree(events); > + return ret; > } > > static ssize_t ffs_ep0_read(struct file *file, char __user *buf, > -- > 1.9.1 > >From 8c813b2563cae23c69895833972da1c1ee92d8dd Mon Sep 17 00:00:00 2001 From: Michal Nazarew

Re: [PATCH v5] usb: gadget: f_fs: add "no_disconnect" mode

2014-12-24 Thread Michal Nazarewicz
change means that another configuration is being selected or USB cable > was unplugged, which indicates that we don't need to stay longer in > FFS_DEACTIVATED state > - unmounting of the FunctionFS instance causes the function to be closed. > > Signed-off

Re: [PATCH 2/3] mm: cma: introduce /proc/cmainfo

2014-12-26 Thread Michal Nazarewicz
On Fri, Dec 26 2014, "Stefan I. Strogin" wrote: > /proc/cmainfo contains a list of currently allocated CMA buffers for every > CMA area when CONFIG_CMA_DEBUG is enabled. > > Format is: > > - ( kB), allocated by \ > (), latency us > > > Signed-off-by: Stefan I. Strogin > --- >

Re: [PATCH 3/3] cma: add functions to get region pages counters

2014-12-26 Thread Michal Nazarewicz
On Fri, Dec 26 2014, "Stefan I. Strogin" wrote: > From: Dmitry Safonov > > Here are two functions that provide interface to compute/get used size > and size of biggest free chunk in cma region. > Added that information in cmainfo. > > Signed-off-by: Dmitry Safono

Re: [PATCH 2/3] mm: cma: introduce /proc/cmainfo

2014-12-29 Thread Michal Nazarewicz
cma_release(cma, page, count); >>> + page = NULL; > On 12/26/2014 07:02 PM, Michal Nazarewicz wrote: >> Harsh, but ok, if you want. On Mon, Dec 29 2014, Stefan Strogin wrote: > Excuse me, maybe you could suggest how to make a nicer fallback? > Or su

Re: [PATCH 3/3] cma: add functions to get region pages counters

2014-12-30 Thread Michal Nazarewicz
> On Fri, Dec 26, 2014 at 05:39:04PM +0300, Stefan I. Strogin wrote: >> From: Dmitry Safonov >> @@ -591,6 +621,10 @@ static int s_show(struct seq_file *m, void *p) >> struct cma_buffer *cmabuf; >> struct stack_trace trace; >> >> +seq_printf(m, "CMARegion stat: %8lu kB total, %8lu k

[PATCH] usb: f_fs: refactor and document __ffs_ep0_read_events better

2015-01-08 Thread Michal Nazarewicz
ery tight upper size limit. Also add some more documentation about the ev.types array and how its size is limited and affects the rest of the code. Reported-by: Dan Carpenter Reported-by: Rohith Seelaboyina Signed-off-by: Michal Nazarewicz --- drivers/usb/gadget/function/f_fs.c |

Re: [PATCH] mm: cma: Fix totalcma_pages to include DT defined CMA regions

2015-01-09 Thread Michal Nazarewicz
_mem() > instead of cma_declare_contiguous() such that it will include reserved > memory used by all CMA regions. > > Signed-off-by: George G. Davis Acked-by: Michal Nazarewicz > --- > mm/cma.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/mm/cma.c b/mm/cm

  1   2   3   4   5   >