Page alignment issue

2006-12-27 Thread Aubrey
reciated! Thanks, -Aubrey - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: Page alignment issue

2006-12-27 Thread Aubrey
On 12/27/06, Aubrey <[EMAIL PROTECTED]> wrote: As for the buddy system, much of docs mention the physical address of the first page frame of a block should be a multiple of the group size. For example, the initial address of a 16-page-frame block should be 16-page aligned. I happe

[RFC][PATCH] A new memory algorithm for the embedded linux system

2006-12-30 Thread Aubrey
really appreciate any comments, suggestions, bug-fixes, and improvement. Thanks, -Aubrey --- --- /home/aubrey/cvs/kernel/branch/uClinux-dist/linux-2.6.x/mm/page_alloc.c 2006-12-19 16:18:46.0

[RFC][PATCH] Fix area->nr_free-- went (-1) issue in buddy system

2006-12-18 Thread Aubrey
and found its buddy in the DMA zone. So the two blocks will be merged and area->nr_free went to -1. My proposed patch is as follows: Signed-off-by: Aubrey Li <[EMAIL PROTECTED]> --- --- page_al

Re: [RFC][PATCH] Fix area->nr_free-- went (-1) issue in buddy system

2006-12-18 Thread Aubrey
zones_size[ZONE_NORMAL] = (end_mem/2 - PAGE_OFFSET) >> PAGE_SHIFT; #endif - This is only what I did the change. I also suspect the zones are not properly aligned, But how to align it? I think our system doesn't need CONFIG_HOLES_IN_ZO

Re: [RFC][PATCH] Fix area->nr_free-- went (-1) issue in buddy system

2006-12-18 Thread Aubrey
On 12/19/06, Nick Piggin <[EMAIL PROTECTED]> wrote: Hi Aubery! That's right. I guess you can either align your zone sizes (must be aligned to MAX_ORDER size), or add the zone check in page_is_buddy. Adding the zone check in page_is_buddy fix the problem. Thanks again, :) -

Re: [PATCH] support O_DIRECT in tmpfs/ramfs

2007-01-10 Thread Aubrey
on /sys type sysfs (rw) devpts on /dev/pts type devpts (rw) root:/var> ./t_direct Error open t.bin to read Error is because O_DIRECT flag was set when call open(). If I remove this flag, the test program can work ok. Any suggestions? Thanks, -Aubrey On 1/10/07

O_DIRECT question

2007-01-10 Thread Aubrey
is, is there a existing way to mount a filesystem with O_DIRECT flag? so that I don't need to change anything in my system. If there is no option so far, What is the right way to achieve my purpose? Thanks a lot. -Aubrey - To unsubscribe from this list: send the line "unsubscribe linux-kernel&

Re: O_DIRECT question

2007-01-10 Thread Aubrey
. So I want to try to use O_DIRECT. But it seems not to be a right way. Thanks for your suggestion about my case. Regards, -Aubrey On 1/11/07, Linus Torvalds <[EMAIL PROTECTED]> wrote: On Thu, 11 Jan 2007, Aubrey wrote: > > Now, my question is, is there a existing way to mount a file

Re: O_DIRECT question

2007-01-10 Thread Aubrey
On 1/11/07, Andrew Morton <[EMAIL PROTECTED]> wrote: On Thu, 11 Jan 2007 13:50:53 +0800 Aubrey <[EMAIL PROTECTED]> wrote: > Firstly I want to say I'm working on no-mmu arch and uClinux. > After much of file operations VFS cache eat up all of the memory. > At this time,

Re: O_DIRECT question

2007-01-10 Thread Aubrey
On 1/11/07, Alexander Shishkin <[EMAIL PROTECTED]> wrote: On 1/11/07, Aubrey <[EMAIL PROTECTED]> wrote: > Firstly I want to say I'm working on no-mmu arch and uClinux. > After much of file operations VFS cache eat up all of the memory. > At this time, if an application

Re: O_DIRECT question

2007-01-10 Thread Aubrey
On 1/11/07, Nick Piggin <[EMAIL PROTECTED]> wrote: Andrew Morton wrote: > On Thu, 11 Jan 2007 14:45:12 +0800 > Aubrey <[EMAIL PROTECTED]> wrote: > > >>>In the interim you could do the old "echo 3 > /proc/sys/vm/drop_caches" >>>thing, but

Re: O_DIRECT question

2007-01-11 Thread Aubrey
7;t improve performance on these cases, but only fragment memory. Maybe O_DIRECT is not a right way to fix this issue. But I think file system need an option for un-buffered access, that means don't use page cache at all. -Aubrey P.S. The following is the test case and crash info. I th

Re: O_DIRECT question

2007-01-11 Thread Aubrey
>pages_limit) balance_cache(mapping); --snip--- 2) A percent number should be better to control the value. Can we add a proc interface to make the value tunable? Thanks, -Aubrey - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the bo

Re: O_DIRECT question

2007-01-11 Thread Aubrey
the perfect is the enemy of the good. Claiming that > there is a "proper solution" is usually a total red herring. Quite often > there isn't, and the "paper over" is actually not papering over, it's > quite possibly the best solution there is. Yeah *smallis

Re: The VFS cache is not freed when there is not enough free memory to allocate

2006-11-29 Thread Aubrey
hen the allocation fails? I don't think so. The kernel doesn't attempt to free it. The log is included in the mail I forwarded to you. Also, do you happen to know of a reasonable toolchain + emulator setup that I could test the nommu kernel with? A project named skyeye. http://www.sky

Re: The VFS cache is not freed when there is not enough free memory to allocate

2006-11-30 Thread Aubrey
why malloc(64K) is ok but malloc(128K) not? Is there any existing parameters about this issue? why not kernel attempt to shrunk cache no matter how big memory allocation is requested? Any thoughts? Thanks, -Aubrey - To unsubscribe from this list: send the line "unsubscribe linux-kernel"

Re: The VFS cache is not freed when there is not enough free memory to allocate

2006-12-01 Thread Aubrey
ter 81 times rebalance, :). So far I haven't found any issue. If I make a patch to move this parameter to be tunable in the proc filesystem on nommu case, is it acceptable? Thanks, -Aubrey - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a messag

Kernel "Oops" output

2001-05-12 Thread Aubrey Kilpatrick
rd If there is additional system/hardware info you need to fix this problem please let me know and I will be glad to try and get it for you. Thank you for your help. Aubrey Kilpatrick email at: [EMAIL PROTECTED] phone: USA 1-334-493-4962 - To unsubscribe from this list: send the line "unsu

Re: O_DIRECT question

2007-01-16 Thread Aubrey Li
ge_cache_alloc(struct address_space *x) { - return __page_cache_alloc(mapping_gfp_mask(x)); + return __page_cache_alloc(mapping_gfp_mask(x)|__GFP_PAGECACHE); } static inline struct page *page_cache_alloc_cold(struct address_space *x)

[RPC][PATCH 2.6.20-rc5] limit total vfs page cache

2007-01-17 Thread Aubrey Li
Here is the newest patch against 2.6.20-rc5. == From ad9ca9a32bdcaddce9988afbf0187bfd04685a0c Mon Sep 17 00:00:00 2001 From: Aubrey.Li <[EMAIL PROTECTED]> Date: Thu, 18 Jan 2007 11:08:31 +0800 Subject: [PATCH] Add an interface to limit total vf

Re: [RPC][PATCH 2.6.20-rc5] limit total vfs page cache

2007-01-19 Thread Aubrey Li
On 1/19/07, Vaidyanathan Srinivasan <[EMAIL PROTECTED]> wrote: Hi Aubrey, I used your patch on my PPC64 box and I do not get expected behavior. As you had requested, I am attaching zoneinfo and meminfo dumps: Please let me know if you need any further data to help me out with th

Re: [RPC][PATCH 2.6.20-rc5] limit total vfs page cache

2007-01-19 Thread Aubrey Li
On 1/19/07, Vaidyanathan Srinivasan <[EMAIL PROTECTED]> wrote: Hi Aubrey, The idea of creating separate flag for pagecache in page_alloc is interesting. The good part is that you flag watermark low and the zone reclaimer will do the rest of the job. However when the zone reclaimer sta

Re: [RPC][PATCH 2.6.20-rc5] limit total vfs page cache

2007-01-19 Thread Aubrey Li
On 1/20/07, Vaidyanathan Srinivasan <[EMAIL PROTECTED]> wrote: Aubrey Li wrote: > On 1/19/07, Vaidyanathan Srinivasan <[EMAIL PROTECTED]> wrote: >> >> Hi Aubrey, >> >> The idea of creating separate flag for pagecache in page_alloc is >> interesti

Re: [RPC][PATCH 2.6.20-rc5] limit total vfs page cache

2007-01-19 Thread Aubrey Li
On 1/20/07, Nick Piggin <[EMAIL PROTECTED]> wrote: Aubrey Li wrote: > On 1/20/07, Vaidyanathan Srinivasan <[EMAIL PROTECTED]> wrote: >> If pagecache is overlimit, we expect old (cold) pagecache pages to >> be thrown out and reused for new file data. We do not expe

Re: [RPC][PATCH 2.6.20-rc5] limit total vfs page cache

2007-01-19 Thread Aubrey Li
On 1/20/07, Nick Piggin <[EMAIL PROTECTED]> wrote: Aubrey Li wrote: > So what's the right way to limit pagecache? Probably something a lot more complicated... if you can say there is a "right way". >> Secondly, your patch isn't actually very good. It uncondi

Re: [RFC] Limit the size of the pagecache

2007-01-23 Thread Aubrey Li
turnaround is just one of the reason that I vaguely recall but I never really understood what the purpose was. > > 3. Reserve memory for other uses? (Aubrey?) > > Maybe. This is still a bad hack, and I don't like to legitimise such use > though. I hope Aubrey isn't relying o

Re: [RFC] Limit the size of the pagecache

2007-01-23 Thread Aubrey Li
That's the point in my mind impacting the performance of the applications. -Aubrey - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read

Re: [RPC][PATCH 2.6.20-rc5] limit total vfs page cache

2007-01-23 Thread Aubrey Li
On 1/24/07, Vaidyanathan Srinivasan <[EMAIL PROTECTED]> wrote: Aubrey Li wrote: > On 1/19/07, Vaidyanathan Srinivasan <[EMAIL PROTECTED]> wrote: >> Hi Aubrey, >> >> I used your patch on my PPC64 box and I do not get expected >> behavior. As you had

Re: [RFC] Limit the size of the pagecache

2007-01-24 Thread Aubrey Li
nsure that anonymous pages that may contain performance >critical data is never subject to swap. This is what we have mlock for, no? > 2. Insure rapid turnaround of pages in the cache. This sounds like we either need more fadvise hints and/or understand why the VM doesn't behave properly.

Re: [RFC] Limit the size of the pagecache

2007-01-24 Thread Aubrey Li
On 1/24/07, Peter Zijlstra <[EMAIL PROTECTED]> wrote: On Wed, 2007-01-24 at 22:22 +0800, Aubrey Li wrote: > On 1/24/07, Peter Zijlstra <[EMAIL PROTECTED]> wrote: > > On Tue, 2007-01-23 at 16:49 -0800, Christoph Lameter wrote: > > > This is a patch using some of Aub

Re: [RFC] Limit the size of the pagecache

2007-01-24 Thread Aubrey Li
ontrol field to lock mmaped pages and remove unmapped pagecache pages only. -Aubrey - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH 2/3] Blackfin: serial driver for Blackfin architecture against Linux kernel 2.6.20

2007-02-05 Thread Aubrey Li
Hi Alan, On 2/5/07, Alan <[EMAIL PROTECTED]> wrote: Likewise - why this not locks ? Other than the locking bits looks ok, although has rather a lot of ifdefs Thanks to point it out. It should be fixed in the coming patch. Thanks, -Aubrey - To unsubscribe from this list: send th

Re: [PATCH 2/3, try #2] Blackfin: serial driver for Blackfin architecture against Linux kernel 2.6.20

2007-02-06 Thread Aubrey Li
*parity = 'e'; > + else > + *parity = 'o'; > + } > + switch (lcr & 0x03) { > + case 0: *bits = 5; break; > + case 1: *bits = 6; break; > + case 2: *bits = 7; break; > + case 3: *bits = 8; break; > + } You do have length and parity settings on this port, yet you don't have code in your set_termios method to set them from the termios... That means termios can't be changed on the fly. it will be enabled in future. > + /* Set DLAB in LCR to Access DLL and DLH */ > + val = UART_GET_LCR(uart); > + val |= DLAB; > + UART_PUT_LCR(uart, val); > + > + dll = UART_GET_DLL(uart); > + dlh = UART_GET_DLH(uart); > + > + /* Clear DLAB in LCR to Access THR RBR IER */ > + val = UART_GET_LCR(uart); > + val &= ~DLAB; > + UART_PUT_LCR(uart, val); > + > + *baud = get_sclk() / (16*(dll | dlh << 8)); > + } > + pr_debug("%s:baud = %d, parity = %c, bits= %d\n", __FUNCTION__, *baud, *parity, *bits); > +} Thanks for your comment and suggestion. I'll get back to you soon. -Aubrey - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH 2/3, try #3] Blackfin: serial driver for Blackfinarchitecture against Linux kernel 2.6.20

2007-02-07 Thread Aubrey Li
c_cflag & PARODD)) > + lcr |= EPS; > + } Insert here: termios->c_iflag |= INPCK | BRKINT | PARMRK; termios->c_iflag &= ~(IGNPAR | IGNBRK); This way applications will know that these controls are not implemented for this port. Thanks a lot to

[BUG]: 2.6.19.2: Weird serial core issue

2007-01-31 Thread Aubrey Li
t type "ENTER". I guess, Is it a serial core bug? -Aubrey - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [BUG]: 2.6.19.2: Weird serial core issue

2007-01-31 Thread Aubrey Li
rg" passed into tty_ioctl() is the address of a termios structure, which include wrong c_cflag. It seems once the flag is assigned by uart_set_options the first time, it's never changed. So even userspace application changed the flag, it will be set back soon. I'll dig into it. But I still think it's a bug. -Aubrey bfin_5xx.c Description: Binary data

Re: [BUG]: 2.6.19.2: Weird serial core issue

2007-02-01 Thread Aubrey Li
On 2/1/07, Russell King <[EMAIL PROTECTED]> wrote: On Thu, Feb 01, 2007 at 10:33:40AM +0800, Aubrey Li wrote: > On 2/1/07, Alan <[EMAIL PROTECTED]> wrote: > >What code is running on that console at the time. Most likely that user > >code is also saving/restoring ter

Re: [BUG]: 2.6.19.2: Weird serial core issue

2007-02-01 Thread Aubrey Li
ed? Now I guess there must be something wrong with serial core. -Aubrey - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [BUG]: 2.6.19.2: Weird serial core issue

2007-02-01 Thread Aubrey Li
On 2/1/07, Russell King <[EMAIL PROTECTED]> wrote: On Thu, Feb 01, 2007 at 06:09:24PM +0800, Aubrey Li wrote: > On 2/1/07, Russell King <[EMAIL PROTECTED]> wrote: > >On Thu, Feb 01, 2007 at 10:33:40AM +0800, Aubrey Li wrote: > >> On 2/1/07, Alan <[EMAIL PROT

Re: [PATCH] [scsi] Remove __GFP_DMA

2007-05-22 Thread Aubrey Li
On 5/23/07, Christoph Lameter <[EMAIL PROTECTED]> wrote: On Mon, 21 May 2007, Bernhard Walle wrote: > [PATCH] [scsi] Remove __GFP_DMA > > After 821de3a27bf33f11ec878562577c586cd5f83c64, it's not necessary to alloate a > DMA buffer any more in sd.c. > > Signed-off-by: Bernhard Walle <[EMAIL PROT

Re: [PATCH] blackfin: Enable arbitary speed serial setting

2007-05-23 Thread Aubrey Li
Thanks. Acked-by: Aubrey Li <[EMAIL PROTECTED]> On 5/24/07, Alan Cox <[EMAIL PROTECTED]> wrote: Add the needed definitions to activate arbitary speed support on the blackfin platform. Signed-off-by: Alan Cox <[EMAIL PROTECTED]> diff -u --new-file --recursive --exclude-fro

Re: udp checksum issue in netpoll mode.

2007-04-16 Thread Aubrey Li
On 4/12/07, Stephen Hemminger <[EMAIL PROTECTED]> wrote: Aubrey Li wrote: > I think we discussed this issue before. > > The current checksum function doesn't consider the kind of packet > which is padded to reach a specific minimum length. I believe that's >

[PATCH] Fix UDP checksum issue in net poll mode.

2007-04-16 Thread Aubrey Li
In net poll mode, the current checksum function doesn't consider the kind of packet which is padded to reach a specific minimum length. I believe that's the problem causing my test case failed. The following patch fixed this issue. Signed-off-by: Aubrey.Li <[EMAIL PROTECTED]> --- net/core/netpoll

Re: [PATCH] CONFIG_PACKET_MMAP should depend on MMU

2007-04-17 Thread Aubrey Li
code snippets if you wanted to make something lightweight... Does anyone else on netdev have a small test app? Here, in the attachment I wrote a small test app. Please correct if there is anything wrong, and feel free to improve it. -Aubrey packet-mmap.tar.gz Description: GNU Zip compressed data

Re: [PATCH] CONFIG_PACKET_MMAP should depend on MMU

2007-04-18 Thread Aubrey Li
On 4/18/07, David Howells <[EMAIL PROTECTED]> wrote: Aubrey Li <[EMAIL PROTECTED]> wrote: > Here, in the attachment I wrote a small test app. Please correct if > there is anything wrong, and feel free to improve it. Okay... I have that working... probably. I don'

Re: [PATCH] CONFIG_PACKET_MMAP should depend on MMU

2007-04-19 Thread Aubrey Li
On 4/18/07, David Howells <[EMAIL PROTECTED]> wrote: Aubrey Li <[EMAIL PROTECTED]> wrote: > Here, in the attachment I wrote a small test app. Please correct if > there is anything wrong, and feel free to improve it. Okay... I have that working... probably. I don'

Re: [PATCH] CONFIG_PACKET_MMAP should depend on MMU

2007-04-20 Thread Aubrey Li
On 4/20/07, David Howells <[EMAIL PROTECTED]> wrote: Aubrey Li <[EMAIL PROTECTED]> wrote: > The patch works properly on my side. But > 1) I'm not sure why you re-wrote alloc/free_pg_vec function, doesn't > the current implement work for NOMMU? I know you wan

Re: [PATCH] CONFIG_PACKET_MMAP should depend on MMU

2007-04-20 Thread Aubrey Li
On 4/20/07, David Howells <[EMAIL PROTECTED]> wrote: Aubrey Li <[EMAIL PROTECTED]> wrote: > as checked in packet_set_ring, buffer size must be a multiple of PAGE_SIZE, > packet_set_ring > if (unlikely(req->tp_block_size &

[PATCH] CONFIG_PACKET_MMAP should depend on MMU

2007-04-08 Thread Aubrey Li
The option CONFIG_PACKET_MMAP should depend on MMU. Signed-off-by: Aubrey.Li <[EMAIL PROTECTED]> --- net/packet/Kconfig |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/net/packet/Kconfig b/net/packet/Kconfig index 34ff93f..959c272 100644 --- a/net/packet/Kconfig +++ b/net

udp checksum issue in netpoll mode.

2007-04-12 Thread Aubrey Li
ating this kind of packet? Thanks, -Aubrey === static __sum16 checksum_udp(struct sk_buff *skb, struct udphdr *uh, unsigned short ulen, __be32 saddr, __be32 daddr) { __wsum psum; if (uh->check == 0 || s

Re: [PATCH -mm 1/5] Blackfin: blackfin architecture patch update

2007-03-04 Thread Aubrey Li
; +#define TIOCGETD 0x5424 > +#define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */ > +#define TIOCTTYGSTRUCT 0x5426 /* For debugging only */ > +#define TIOCSBRK 0x5427 /* BSD compatibility */ > +#define TIOCCBRK 0x5428 /* BSD compatibility */ > +#

Re: [PATCH 3/3][RFC] Containers: Pagecache controller reclaim

2007-03-26 Thread Aubrey Li
} + } Please correct me if I'm wrong. Here, if page type is mapped or not overlimit, why add it back to active list? Did shrink_page_list() is called by shrink_inactive_list()? -Aubrey - To unsubscribe from this list: send the line "unsubscribe linux-kernel&q

Re: [PATCH 3/3][RFC] Containers: Pagecache controller reclaim

2007-03-27 Thread Aubrey Li
pages, so it's quite possible the limit is hit again, and hence the reclaim code will be called again and again, that will impact application performance. -Aubrey - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PRO

Re: [PATCH 3/3][RFC] Containers: Pagecache controller reclaim

2007-03-27 Thread Aubrey Li
On 3/27/07, Vaidyanathan Srinivasan <[EMAIL PROTECTED]> wrote: Aubrey Li wrote: > On 3/27/07, Vaidyanathan Srinivasan <[EMAIL PROTECTED]> wrote: >> Correct, shrink_page_list() is called from shrink_inactive_list() but >> the above code is patched in

[Quick question] serial core issue

2007-03-29 Thread Aubrey Li
When register serial driver as a console, the driver function my_remove() my_shutdown() seems be never called. So the driver can't reclaim resource when the command "reboot" is issued. Is it intended? -Aubrey - To unsubscribe from this list: send the line "unsubscribe

Re: [Quick question] serial core issue

2007-03-29 Thread Aubrey Li
On 3/30/07, Lee Revell <[EMAIL PROTECTED]> wrote: On 3/29/07, Aubrey Li <[EMAIL PROTECTED]> wrote: > When register serial driver as a console, the driver function > > my_remove() > my_shutdown() > > seems be never called. > > So the driver can't recl

Re: [PATCH] nommu arch dont zero the anonymous mapping by adding UNINITIALIZE flag

2007-03-30 Thread Aubrey Li
m_are /* clear the last little bit */ if (ret < len) memset(base + ret, 0, len - ret); - - } else { - /* if it's an anonymous mapping, then just clear it */ - memset(base, 0, len); } return

Re: [PATCH] nommu arch dont zero the anonymous mapping by adding UNINITIALIZE flag

2007-03-30 Thread Aubrey Li
On 3/30/07, David Howells <[EMAIL PROTECTED]> wrote: Aubrey Li <[EMAIL PROTECTED]> wrote: > malloc() allocates size bytes and returns a pointer to the allocated memory. > The memory is not cleared. But this is *not* malloc(). It's mmap(). Are you prepared to g

Re: [PATCH] nommu arch dont zero the anonymous mapping by adding UNINITIALIZE flag

2007-03-30 Thread Aubrey Li
So now the question is, Keep the same behave as MMU but with bad performance, or keep the same performance as MMU but without the same behave, Which one is more important? -Aubrey - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of

Re: [PATCH] nommu arch dont zero the anonymous mapping by adding UNINITIALIZE flag

2007-03-30 Thread Aubrey Li
On 3/30/07, David Howells <[EMAIL PROTECTED]> wrote: Aubrey Li <[EMAIL PROTECTED]> wrote: > Keep the same behave as MMU but with bad performance, or keep the same > performance as MMU but without the same behave, Which one is more > important? The thing to do is to pas

Re: [RFC PATCH v2 1/8] cpuidle: menu: extract prediction functionality

2017-10-15 Thread Li, Aubrey
On 2017/10/14 8:26, Rafael J. Wysocki wrote: > On Saturday, September 30, 2017 9:20:27 AM CEST Aubrey Li wrote: >> There are several factors in the menu governor to predict the next >> idle interval: >> - the next timer >> - the recent idle interval history >> - th

Re: [RFC PATCH v2 2/8] cpuidle: record the overhead of idle entry

2017-10-15 Thread Li, Aubrey
On 2017/10/14 8:35, Rafael J. Wysocki wrote: > On Saturday, September 30, 2017 9:20:28 AM CEST Aubrey Li wrote: >> Record the overhead of idle entry in micro-second >> > > What is this needed for? We need to figure out how long of a idle is a short idle and recording the

Re: [RFC PATCH v2 4/8] tick/nohz: keep tick on for a fast idle

2017-10-15 Thread Li, Aubrey
On 2017/10/14 8:51, Rafael J. Wysocki wrote: > On Saturday, September 30, 2017 9:20:30 AM CEST Aubrey Li wrote: >> If the next idle is expected to be a fast idle, we should keep tick >> on before going into idle >> >> Signed-off-by: Aubrey Li > > This also can

Re: [RFC PATCH v2 4/8] tick/nohz: keep tick on for a fast idle

2017-10-15 Thread Li, Aubrey
On 2017/10/16 12:45, Mike Galbraith wrote: > On Mon, 2017-10-16 at 11:26 +0800, Li, Aubrey wrote: >> >> I'll try to move quiet_vmstat() into the normal idle branch if this patch >> series >> are reasonable. Is fast_idle a good indication for it? > > see

Re: [RFC PATCH v2 6/8] cpuidle: make fast idle threshold tunable

2017-10-15 Thread Li, Aubrey
On 2017/10/14 8:59, Rafael J. Wysocki wrote: > On Saturday, September 30, 2017 9:20:32 AM CEST Aubrey Li wrote: >> Add a knob to make fast idle threshold tunable >> >> Signed-off-by: Aubrey Li > > I first of all am not sure about the need to add a tunable for this

Re: [RFC PATCH v2 7/8] cpuidle: introduce irq timing to make idle prediction

2017-10-15 Thread Li, Aubrey
On 2017/10/14 9:01, Rafael J. Wysocki wrote: > On Saturday, September 30, 2017 9:20:33 AM CEST Aubrey Li wrote: >> Introduce irq timings output as a factor to predict the duration >> of the coming idle >> >> @@ -342,13 +343,27 @@ void cpuidle_entry_end(void) &g

Re: [RFC PATCH v2 4/8] tick/nohz: keep tick on for a fast idle

2017-10-15 Thread Li, Aubrey
On 2017/10/16 14:25, Mike Galbraith wrote: > On Mon, 2017-10-16 at 13:34 +0800, Li, Aubrey wrote: >> On 2017/10/16 12:45, Mike Galbraith wrote: >>> On Mon, 2017-10-16 at 11:26 +0800, Li, Aubrey wrote: >>>> >>>> I'll try to move quiet_vmstat() into th

Re: [RFC PATCH v2 5/8] timers: keep sleep length updated as needed

2017-10-15 Thread Li, Aubrey
On 2017/10/14 8:56, Rafael J. Wysocki wrote: > On Saturday, September 30, 2017 9:20:31 AM CEST Aubrey Li wrote: >> sleep length indicates how long we'll be idle. Currently, it's updated >> only when tick nohz enters. These patch series make a new requirement >> wit

Re: [RFC PATCH v2 0/8] Introduct cpu idle prediction functionality

2017-10-16 Thread Li, Aubrey
On 2017/10/14 9:14, Rafael J. Wysocki wrote: > On Saturday, September 30, 2017 9:20:26 AM CEST Aubrey Li wrote: >> We found under some latency intensive workloads, short idle periods occurs >> very common, then idle entry and exit path starts to dominate, so it's >> impo

Re: [RFC PATCH v2 3/8] cpuidle: add a new predict interface

2017-10-16 Thread Li, Aubrey
On 2017/10/14 8:45, Rafael J. Wysocki wrote: > On Saturday, September 30, 2017 9:20:29 AM CEST Aubrey Li wrote: >> For the governor has predict functionality, add a new predict >> interface in cpuidle framework to call and use it. > > Care to describe how it is intended to

Re: [RFC PATCH v2 3/8] cpuidle: add a new predict interface

2017-10-16 Thread Li, Aubrey
e, this is not related to cpuidle call. The other two factors are derived from idle interval history, the data is already maintained in menu_device data structure. I'm not sure if this can address your concern, or anything else I can provide to help this. Thanks, -Aubrey

Re: [RFC PATCH v2 5/8] timers: keep sleep length updated as needed

2017-10-16 Thread Li, Aubrey
On 2017/10/17 7:58, Rafael J. Wysocki wrote: > On Monday, October 16, 2017 8:46:41 AM CEST Li, Aubrey wrote: >> On 2017/10/14 8:56, Rafael J. Wysocki wrote: >>> On Saturday, September 30, 2017 9:20:31 AM CEST Aubrey Li wrote: >>>> sleep length indicates how long

Re: [RFC PATCH v2 6/8] cpuidle: make fast idle threshold tunable

2017-10-16 Thread Li, Aubrey
On 2017/10/17 8:01, Rafael J. Wysocki wrote: > On Monday, October 16, 2017 8:00:45 AM CEST Li, Aubrey wrote: >> On 2017/10/14 8:59, Rafael J. Wysocki wrote: >>> On Saturday, September 30, 2017 9:20:32 AM CEST Aubrey Li wrote: >>>> Add a knob to make fast idle threshol

Re: [RFC PATCH v2 2/8] cpuidle: record the overhead of idle entry

2017-10-17 Thread Li, Aubrey
On 2017/10/17 8:05, Rafael J. Wysocki wrote: > On Monday, October 16, 2017 5:11:57 AM CEST Li, Aubrey wrote: >> On 2017/10/14 8:35, Rafael J. Wysocki wrote: >>> On Saturday, September 30, 2017 9:20:28 AM CEST Aubrey Li wrote: >>>> Record the overhead of idle entry in

Re: [RFC PATCH v2 0/8] Introduct cpu idle prediction functionality

2017-10-17 Thread Li, Aubrey
On 2017/10/17 8:07, Rafael J. Wysocki wrote: > On Monday, October 16, 2017 9:44:41 AM CEST Li, Aubrey wrote: >> >> Or you concern why the threshold can't simply be tick interval? > > That I guess. > >> For the latter, if the threshold is close/equal to the t

Re: [RFC/RFT][PATCH 4/7] cpuidle: menu: Split idle duration prediction from state selection

2018-03-05 Thread Li, Aubrey
> Maybe just return a "nohz" indicator from cpuidle_select() in addition >> to the state index and make the decision in the governor? > > Much better option than returning a duration :-) > So what does "nohz = disable and state index = deepest" mean? This combination does not make sense for performance only purpose? Thanks, -Aubrey

Re: [RFC/RFT][PATCH 4/7] cpuidle: menu: Split idle duration prediction from state selection

2018-03-06 Thread Li, Aubrey
On 2018/3/6 16:45, Peter Zijlstra wrote: > On Tue, Mar 06, 2018 at 10:15:10AM +0800, Li, Aubrey wrote: >> On 2018/3/5 21:53, Peter Zijlstra wrote: >>> On Mon, Mar 05, 2018 at 02:05:10PM +0100, Rafael J. Wysocki wrote: >>>> On Mon, Mar 5, 2018 at 1:50 PM, Peter Zijls

Re: [PATCH v3 1/2] x86/fpu: track AVX-512 usage of tasks

2018-11-25 Thread Li, Aubrey
On 2018/11/18 22:03, Samuel Neves wrote: > On 11/17/18 12:36 AM, Li, Aubrey wrote: >> On 2018/11/17 7:10, Dave Hansen wrote: >>> Just to be clear: there are 3 AVX-512 XSAVE states: >>> >>> XFEATURE_OPMASK, >>> XFEATURE_ZMM_Hi256, >&

Re: [PATCH v3 1/2] x86/fpu: track AVX-512 usage of tasks

2018-11-20 Thread Li, Aubrey
On 2018/11/18 22:03, Samuel Neves wrote: > On 11/17/18 12:36 AM, Li, Aubrey wrote: >> On 2018/11/17 7:10, Dave Hansen wrote: >>> Just to be clear: there are 3 AVX-512 XSAVE states: >>> >>> XFEATURE_OPMASK, >>> XFEATURE_ZMM_Hi256, >&

Re: [PATCH v3 2/2] proc: add /proc//arch_state

2018-11-20 Thread Li, Aubrey
On 2018/11/20 1:39, Peter Zijlstra wrote: > On Thu, Nov 15, 2018 at 07:00:07AM +0800, Aubrey Li wrote: >> Add a /proc//arch_state interface to expose per-task cpu specific >> state values. >> >> Exposing AVX-512 Hi16_ZMM registers usage is for the user space job >

Re: [PATCH v3 2/2] proc: add /proc//arch_state

2018-11-21 Thread Li, Aubrey
On 2018/11/21 17:53, Peter Zijlstra wrote: > On Wed, Nov 21, 2018 at 09:19:36AM +0100, Peter Zijlstra wrote: >> On Wed, Nov 21, 2018 at 09:39:00AM +0800, Li, Aubrey wrote: >>>> Also; you were going to shop around with the other architectures to see >>>> what the

[PATCH v3 1/2] x86/fpu: track AVX-512 usage of tasks

2018-11-14 Thread Aubrey Li
immediately, but requires 3 consecutive context switches with no usage to clear it. This decay is required because of AVX-512 using tasks could set Hi16_ZMM state back to the init state themselves. Signed-off-by: Aubrey Li Cc: Peter Zijlstra Cc: Andi Kleen Cc: Tim Chen Cc: Dave Hansen Cc: Arjan van

[PATCH v3 2/2] proc: add /proc//arch_state

2018-11-14 Thread Aubrey Li
Add a /proc//arch_state interface to expose per-task cpu specific state values. Exposing AVX-512 Hi16_ZMM registers usage is for the user space job scheduler to cluster AVX-512 using tasks together, because these tasks could cause core turbo frequency drop. Signed-off-by: Aubrey Li Cc: Peter

Re: [PATCH v3 1/2] x86/fpu: track AVX-512 usage of tasks

2018-11-15 Thread Li, Aubrey
On 2018/11/15 23:40, Dave Hansen wrote: > On 11/14/18 3:00 PM, Aubrey Li wrote: >> AVX-512 component has 3 states, only Hi16_ZMM state causes notable >> frequency drop. Add per task Hi16_ZMM state tracking to context switch. > > Just curious, but is there any public docum

Re: [PATCH v3 2/2] proc: add /proc//arch_state

2018-11-15 Thread Li, Aubrey
On 2018/11/15 23:18, Dave Hansen wrote: > On 11/14/18 3:00 PM, Aubrey Li wrote: >> +void arch_thread_state(struct seq_file *m, struct task_struct *task) >> +{ >> +/* >> + * Report AVX-512 Hi16_ZMM registers usage >> + */ >>

Re: [PATCH v3 1/2] x86/fpu: track AVX-512 usage of tasks

2018-11-16 Thread Li, Aubrey
On 2018/11/17 7:10, Dave Hansen wrote: > On 11/15/18 4:21 PM, Li, Aubrey wrote: >> "Core cycles where the core was running with power delivery for license >> level 2 (introduced in Skylake Server microarchitecture). This includes >> high current AVX 512-bit instruc

Re: [RFC PATCH v2 1/2] x86/fpu: detect AVX task

2018-11-11 Thread Li, Aubrey
On 2018/11/9 19:21, Thomas Gleixner wrote: > Aubrey, > > On Thu, 8 Nov 2018, Aubrey Li wrote: > >> Subject: x86/fpu: detect AVX task > > What is an AVX task? I know what you mean, but for the casual reader this > is not very informative. So something like: >

Re: [RFC PATCH v2 1/2] x86/fpu: detect AVX task

2018-11-11 Thread Li, Aubrey
Hi Dave, Thanks for your comments! On 2018/11/12 10:32, Dave Hansen wrote: > On 11/7/18 9:16 AM, Aubrey Li wrote: >> XSAVES and its variants use init optimization to reduce the amount of >> data that they save to memory during context switch. Init optimization >> uses the s

Re: [RFC PATCH v1 2/2] proc: add /proc//thread_state

2018-11-11 Thread Li, Aubrey
On 2018/11/12 13:31, Ingo Molnar wrote: > > * Peter Zijlstra wrote: > >> On Thu, Nov 08, 2018 at 07:32:46AM +0100, Ingo Molnar wrote: >>> >>> * Aubrey Li wrote: >>> >>>> Expose the per-task cpu specific thread state value, it's help

Re: [RFC PATCH v2 1/2] x86/fpu: detect AVX task

2018-11-12 Thread Li, Aubrey
On 2018/11/12 23:46, Dave Hansen wrote: > On 11/11/18 9:38 PM, Li, Aubrey wrote: > >>> Do we want this, or do we want something more time-based? >>> >> This counter is introduced here to solve the race of context switch and >> VZEROUPPER. 3 context switches

Re: [RFC PATCH v2 1/2] x86/fpu: detect AVX task

2018-11-13 Thread Li, Aubrey
On 2018/11/13 18:25, David Laight wrote: > From: Li, Aubrey >> Sent: 12 November 2018 01:41 > ... >> VZEROUPPER instruction resets the init state. If context switch happens >> to occur exactly after VZEROUPPER instruction, XINUSE bitmap is empty(all >> zeros), which i

Re: [PATCH v4 1/2] x86/fpu: track AVX-512 usage of tasks

2018-12-11 Thread Li, Aubrey
On 2018/12/12 8:14, Arjan van de Ven wrote: > On 12/11/2018 3:46 PM, Li, Aubrey wrote: >> On 2018/12/12 1:18, Dave Hansen wrote: >>> On 12/10/18 4:24 PM, Aubrey Li wrote: >>>> The tracking turns on the usage flag at the next context switch of >>>> th

[RESEND PATCH v5 1/3] x86/fpu: track AVX-512 usage of tasks

2018-12-17 Thread Aubrey Li
. Signed-off-by: Aubrey Li Cc: Peter Zijlstra Cc: Andi Kleen Cc: Tim Chen Cc: Dave Hansen Cc: Arjan van de Ven --- arch/x86/include/asm/fpu/internal.h | 7 +++ arch/x86/include/asm/fpu/types.h| 7 +++ 2 files changed, 14 insertions(+) diff --git a/arch/x86/include/asm/fpu/internal.h b

[RESEND PATCH v5 2/3] proc: add AVX-512 usage elapsed time to /proc/pid/status

2018-12-17 Thread Aubrey Li
5,961 core_power.lvl2_turbo_license 1.004031387 seconds time elapsed Non-zero counter value confirms that the task causes frequency drop. Signed-off-by: Aubrey Li Cc: Peter Zijlstra Cc: Andi Kleen Cc: Tim Chen Cc: Dave Hansen Cc: Arjan van de Ven --- arch/x86/kernel/fpu/xstate.c | 34 +++

[RESEND PATCH v5 3/3] Documentation/filesystems/proc.txt: add AVX512_elapsed_ms

2018-12-17 Thread Aubrey Li
Added AVX512_elapsed_ms in /proc//status. Report it in Documentation/filesystems/proc.txt Signed-off-by: Aubrey Li Cc: Peter Zijlstra Cc: Andi Kleen Cc: Tim Chen Cc: Dave Hansen Cc: Arjan van de Ven --- Documentation/filesystems/proc.txt | 4 +++- 1 file changed, 3 insertions(+), 1

Re: [RESEND PATCH v5 1/3] x86/fpu: track AVX-512 usage of tasks

2018-12-18 Thread Li, Aubrey
On 2018/12/18 16:33, Thomas Gleixner wrote: > Aubrey, > > On Tue, 18 Dec 2018, Aubrey Li wrote: > > RESEND > > Please don't do that. This is not a resend because you changed something, > so it's new version. Usually I ignore resends when I have the original

[PATCH v6 3/3] Documentation/filesystems/proc.txt: add AVX512_elapsed_ms

2018-12-18 Thread Aubrey Li
Added AVX512_elapsed_ms in /proc//status. Report it in Documentation/filesystems/proc.txt Signed-off-by: Aubrey Li Cc: Peter Zijlstra Cc: Andi Kleen Cc: Tim Chen Cc: Dave Hansen Cc: Arjan van de Ven --- Documentation/filesystems/proc.txt | 4 +++- 1 file changed, 3 insertions(+), 1

[PATCH v6 2/3] proc: add AVX-512 usage elapsed time to /proc/pid/status

2018-12-18 Thread Aubrey Li
5,961 core_power.lvl2_turbo_license 1.004031387 seconds time elapsed Non-zero counter value confirms that the task causes frequency drop. Signed-off-by: Aubrey Li Cc: Peter Zijlstra Cc: Andi Kleen Cc: Tim Chen Cc: Dave Hansen Cc: Arjan van de Ven --- arch/x86/kernel/fpu/xstate.c | 34 +++

[PATCH v6 1/3] x86/fpu: track AVX-512 usage of tasks

2018-12-18 Thread Aubrey Li
. Signed-off-by: Aubrey Li Cc: Peter Zijlstra Cc: Andi Kleen Cc: Tim Chen Cc: Dave Hansen Cc: Arjan van de Ven --- arch/x86/include/asm/fpu/internal.h | 7 +++ arch/x86/include/asm/fpu/types.h| 7 +++ 2 files changed, 14 insertions(+) diff --git a/arch/x86/include/asm/fpu/internal.h b

  1   2   3   4   5   6   >