Re: Inconsistencies in 3dNOW handling

2000-11-14 Thread Yann Dirson

On Tue, Nov 14, 2000 at 08:57:29AM +0100, Arjan van de Ven wrote:
> The test11pre2 code will also not run on a K6-II/III

I'll look at this.


> Some of the "MMX" instructions are part of "3Dnow" according  to AMD
> publications. This is especially true for the "prefetch" instructions which
> have a different memnonic/opcode on Intel CPU's.

If we don't use them on pure MMX-enabled machine, but only on 3Dnow
ones, what about renaming those *mmx* {files,funcs} to *3dnow* ?


> > > - BTW, what does this 512 stand for ?  Especially as it's used in
> > several places, a #define would seem nice at first glance.
> 
> The 512 is a rough estimate of the minimum size of the copy that makes it
> worth saving and restoring the extra processor-state for using mmx.

What about "#define MMX_MIN_ACCELERATED_COPYSIZE 512" in mmx.h ?

Er... s/MMX/3DNOW/ :)



Hm, noone commented my note about usercopy.c's 3dnow code being
possibly fixed by cut-and paste from elsewhere ?


Regards,
-- 
Yann Dirson<[EMAIL PROTECTED]> |Why make M$-Bill richer & richer ?
debian-email:   <[EMAIL PROTECTED]> |   Support Debian GNU/Linux:
| Cheaper, more Powerful, more Stable !
http://ydirson.free.fr/ | Check <http://www.debian.org/>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Inconsistencies in 3dNOW handling

2000-11-13 Thread Yann Dirson


Looking at what the CONFIG_X86_USE_3DNOW config option in 2.40.-test10
enables, I find a couple of strange things.  This led me through a
small high-level audit of 3DNOW/MMX stuff.

Hopefully someone will be able to explain or to confirm whether the
points I highlight are indeed bugs.  I'd value some comments before
starting to change this :}


- CONFIG_MK6 is described as "K6/K6-II/K6-III", and CONFIG_MK7 as
"Athlon/K7".  Of these two, only the latter defines
CONFIG_X86_USE_3DNOW, although K6-II and K6-III do provide 3DNOW
instructions.  We even find in strings-486.h a comment saying:

This CPU favours 3DNow strongly (eg AMD K6-II, K6-III, Athlon)

OTOH, string.h only says:

 *  This CPU favours 3DNow strongly (eg AMD Athlon)

page.h says:

 *  On older X86 processors its not a win to use MMX here it seems.
 *  Maybe the K6-III ?

Gasp.  Would it or not in the end be useful to add a CONFIG_MK6II
option that would enable 3DNOW ?


- In all places where 3DNOW is tested (strings-486.h, page.h), only
MMX-specific funcs are used (_mmx_memcpy mostly, mmx_{clear,copy}_page)

page.h says:

 *  On older X86 processors its not a win to use MMX here it seems.
 *  Maybe the K6-III ?

mmx.[ch] say:

 *  MMX 3Dnow! helper operations

So do they use MMX or 3Dnow after all ?  They are distinct processor
features, aren't they ?

If this option is really just meant to enable MMX stuff, let's just
call it by its name

Some doc about that should be written - I'll gladly do that once I've
gathered the info.  Some Documentation/i386/MMX file maybe, or in
mmx.c.  But this info won't be easily found anyway if we keep using
3DNOW as a name for the config option...  Objections ?


- mmx.c says:

Checksums are not a win with MMX on any CPU
tested so far for any MMX solution figured

This would be better to have the list of tested CPUs here.  Does
someone have this list ?


- there is even a CONFIG_X86_USE_3DNOW_AND_WORKS option, that would
enable MMX in __generic_copy-{to,from}_user
(arch/i386/lib/usercopy.c).  There is no comment about why this code
was disabled.

This code uses the following test to trigger MMX use:

if(n<512)
__copy_user(to,from,n);
else
mmx_copy_user(to,from,n);

... whereas string{,-486}.h use the following test to trigger MMX use:

if(len<512 || in_interrupt())
return __constant_memcpy(to, from, len);
return _mmx_memcpy(to, from, len);

Could this be the cause of the problem ?


You'll also have noticed the inconsistent naming in 2 highly similar
pieces of code.


- BTW, what does this 512 stand for ?  Especially as it's used in
several places, a #define would seem nice at first glance.


- In mmx.c, function naming and ordering really seems inconsistent.
Or is there a reason for a "zero/clear" duality ?


- drivers/md/xor.c says:

certain CPU features like MMX can only be detected runtime

I'm not sure how much this relates to the above, but I'd say a MMX
config option could be used for this ?  Or a common detection routine
that other drivers could use ?

-- 
Yann Dirson<[EMAIL PROTECTED]> |Why make M$-Bill richer & richer ?
debian-email:   <[EMAIL PROTECTED]> |   Support Debian GNU/Linux:
| Cheaper, more Powerful, more Stable !
http://ydirson.free.fr/ | Check <http://www.debian.org/>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



[2.2pre] crash after unloading agpgart and loading mga DRM module

2000-11-08 Thread Yann Dirson


I could reproduce this with 2.2.18pre17 + Andrea's VM-global patch (-7),
pre20 with and without the VM patch.

Mainboard is a FIC VA503+, video is a G200.

Better run this with everything mounted RO:

$ insmod agpgart
$ rmmod agpgart
$ insmod agpgart
$ insmod mga

And here we go...

I tested a combinations, and what appears trigger the bug is the unloading
of agpgart and the subsequent loading of mga.


[Data gathered with vanilla pre20 - config file attached]

While in single-user mode, all FS mounted RO.

2 OOPSes at same EIP (locks_remove_flock+0x0E) for init are on screen,
similar ones for bash occured just before, although the 1st one for bash is
partly offscreen and I can't scrollback.

OOPSes per process are:

* paging request at e850097c (EFLAGS=00010286)
* NULL pointer dereference at 00...0008 (EFLAGS=00010292 in this case)

Not sure I remember the correct order, though.

A couple of "hda lost interrupt" also appear from time to time.  All of this
(OOPS+lost intr) do not appear at once, but usually all of them come after
waiting some time.  At the very least I only had bash not giving me a prompt
any more after hitting RETURN.

Anyone seing this ?
-- 
Yann Dirson<[EMAIL PROTECTED]> |Why make M$-Bill richer & richer ?
debian-email:   <[EMAIL PROTECTED]> |   Support Debian GNU/Linux:
| Cheaper, more Powerful, more Stable !
http://ydirson.free.fr/ | Check <http://www.debian.org/>


#
# Automatically generated make config: don't edit
#

#
# Code maturity level options
#
CONFIG_EXPERIMENTAL=y

#
# Processor type and features
#
# CONFIG_M386 is not set
# CONFIG_M486 is not set
# CONFIG_M586 is not set
CONFIG_M586TSC=y
# CONFIG_M686 is not set
CONFIG_X86_WP_WORKS_OK=y
CONFIG_X86_INVLPG=y
CONFIG_X86_BSWAP=y
CONFIG_X86_POPAD_OK=y
CONFIG_X86_TSC=y
# CONFIG_MICROCODE is not set
CONFIG_X86_MSR=m
CONFIG_X86_CPUID=m
CONFIG_1GB=y
# CONFIG_2GB is not set
# CONFIG_MATH_EMULATION is not set
CONFIG_MTRR=y
# CONFIG_SMP is not set

#
# Loadable module support
#
CONFIG_MODULES=y
CONFIG_MODVERSIONS=y
CONFIG_KMOD=y

#
# General setup
#
CONFIG_NET=y
CONFIG_PCI=y
# CONFIG_PCI_GOBIOS is not set
# CONFIG_PCI_GODIRECT is not set
CONFIG_PCI_GOANY=y
CONFIG_PCI_BIOS=y
CONFIG_PCI_DIRECT=y
# CONFIG_PCI_QUIRKS is not set
CONFIG_PCI_OLD_PROC=y
# CONFIG_MCA is not set
# CONFIG_VISWS is not set
CONFIG_SYSVIPC=y
# CONFIG_BSD_PROCESS_ACCT is not set
CONFIG_SYSCTL=y
# CONFIG_BINFMT_AOUT is not set
CONFIG_BINFMT_ELF=y
CONFIG_BINFMT_MISC=m
# CONFIG_BINFMT_JAVA is not set
CONFIG_PARPORT=m
CONFIG_PARPORT_PC=m
# CONFIG_PARPORT_OTHER is not set
# CONFIG_APM is not set
# CONFIG_TOSHIBA is not set

#
# Plug and Play support
#
# CONFIG_PNP is not set

#
# Block devices
#
CONFIG_BLK_DEV_FD=m
CONFIG_BLK_DEV_IDE=y

#
# Please see Documentation/ide.txt for help/info on IDE drives
#
# CONFIG_BLK_DEV_HD_IDE is not set
CONFIG_BLK_DEV_IDEDISK=y
CONFIG_BLK_DEV_IDECD=m
# CONFIG_BLK_DEV_IDETAPE is not set
# CONFIG_BLK_DEV_IDEFLOPPY is not set
# CONFIG_BLK_DEV_IDESCSI is not set
# CONFIG_BLK_DEV_CMD640 is not set
# CONFIG_BLK_DEV_RZ1000 is not set
CONFIG_BLK_DEV_IDEPCI=y
CONFIG_BLK_DEV_IDEDMA=y
# CONFIG_BLK_DEV_OFFBOARD is not set
CONFIG_IDEDMA_AUTO=y
# CONFIG_BLK_DEV_OPTI621 is not set
# CONFIG_BLK_DEV_ALI15X3 is not set
# CONFIG_BLK_DEV_TRM290 is not set
# CONFIG_BLK_DEV_NS87415 is not set
CONFIG_BLK_DEV_VIA82C586=y
# CONFIG_BLK_DEV_CMD646 is not set
# CONFIG_BLK_DEV_CS5530 is not set
# CONFIG_IDE_CHIPSETS is not set

#
# Additional Block Devices
#
CONFIG_BLK_DEV_LOOP=m
# CONFIG_BLK_DEV_NBD is not set
# CONFIG_BLK_DEV_MD is not set
CONFIG_BLK_DEV_RAM=m
CONFIG_BLK_DEV_RAM_SIZE=4096
# CONFIG_BLK_DEV_XD is not set
# CONFIG_BLK_DEV_DAC960 is not set
CONFIG_PARIDE_PARPORT=m
# CONFIG_PARIDE is not set
# CONFIG_BLK_CPQ_DA is not set
# CONFIG_BLK_CPQ_CISS_DA is not set
# CONFIG_BLK_DEV_HD is not set

#
# Networking options
#
CONFIG_PACKET=m
CONFIG_NETLINK=y
CONFIG_RTNETLINK=y
# CONFIG_NETLINK_DEV is not set
# CONFIG_FIREWALL is not set
# CONFIG_FILTER is not set
CONFIG_UNIX=y
CONFIG_INET=y
# CONFIG_IP_MULTICAST is not set
# CONFIG_IP_ADVANCED_ROUTER is not set
# CONFIG_IP_PNP is not set
# CONFIG_IP_ROUTER is not set
# CONFIG_NET_IPIP is not set
# CONFIG_NET_IPGRE is not set
# CONFIG_IP_ALIAS is not set
# CONFIG_ARPD is not set
# CONFIG_SYN_COOKIES is not set

#
# (it is safe to leave these untouched)
#
# CONFIG_INET_RARP is not set
# CONFIG_SKB_LARGE is not set
# CONFIG_IPV6 is not set

#
#  
#
# CONFIG_IPX is not set
# CONFIG_ATALK is not set
# CONFIG_X25 is not set
# CONFIG_LAPB is not set
# CONFIG_BRIDGE is not set
# CONFIG_NET_DIVERT is not set
# CONFIG_LLC is not set
# CONFIG_ECONET is not set
# CONFIG_WAN_ROUTER is not set
# CONFIG_NET_FASTROUTE is not set
# CONFIG_NET_HW_FLOWCONTROL is not set
# CONFIG_CPU_IS_SLOW is not set

#
# QoS and/or fair queueing
#
# CONFIG_NET_SCHED is not set

#
# Telephony Support
#
# CONFIG_PHONE is not set
# CONFIG_PHONE_I

Re: Looking for better 2.2-based VM (do_try_to_free_pages fails, machine hangs)

2000-11-07 Thread Yann Dirson

On Mon, Nov 06, 2000 at 02:48:27PM -0700, Jeff V. Merkey wrote:
> Yann Dirson wrote:
> > Nov  5 22:36:17 bylbo nscd: 925: while accepting connection: Cannot allocate memory
> > 
> > They usually appear at cron.daily time, although it looks like I kinda can
> > reproduce them.  I'm still investigating and narrowing - they seem to avoid
> > me unfortunately :(  Will launch a tracking job for the night, hopefully
> > I'll narrow to the single cron job this time.

Hm... 12h non-stop looping on the cron jobs and nothing in the logs.

Heisenbug :}


> > Anyone seen that ?
> 
> I see it with sendmail all the time when the fs gets really busy, and
> memory gets low in 
> box. 

But if your memory gets low it seems at least less anormal...  In my case it
occured at night when only the cron job was running.

-- 
Yann Dirson<[EMAIL PROTECTED]> |Why make M$-Bill richer & richer ?
debian-email:   <[EMAIL PROTECTED]> |   Support Debian GNU/Linux:
| Cheaper, more Powerful, more Stable !
http://ydirson.free.fr/ | Check <http://www.debian.org/>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: Looking for better 2.2-based VM (do_try_to_free_pages fails, machine hangs)

2000-11-06 Thread Yann Dirson

On Wed, Nov 01, 2000 at 10:00:02PM +0100, Andrea Arcangeli wrote:
> On Wed, Nov 01, 2000 at 10:03:27PM +0100, Yann Dirson wrote:
> > On Wed, Nov 01, 2000 at 02:59:01PM -0200, Rik van Riel wrote:
> > 
> > Andrea wrote:
> > > (btw, make sure you're using the -7 revision of the VM-global patch, as it
> > > includes the same MM corruption bugfix that is been included into 18pre18)
> > 
> > Damn, I was using -6.  
>http://www.kernel.org/pub/linux/kernel/people/andrea/patches/v2.2/2.2.18pre9/ does 
>not have -7.
> > Neither does your e-mind repository hlinked from linux-mm.
> > 
> > I'm currently running -6 :(
> 
> A -7 to apply to 2.2.18pre17 and _previous_ releases is in the directory
> patches/v2.2/2.2.18pre17/. An equivalent one against 2.2.18pre18 (and probably
> future releases) is in patches/v2.2/2.2.18pre18/.

Now running 2.2.18pre17 + -7 since a few days

The problems I had appear to be gone.  However with this kernel I have
bursts of error messages from nscd (from glibc 2.1.95) like this one taken
from daemon.log:

Nov  5 22:36:17 bylbo nscd: 925: while accepting connection: Cannot allocate memory

They usually appear at cron.daily time, although it looks like I kinda can
reproduce them.  I'm still investigating and narrowing - they seem to avoid
me unfortunately :(  Will launch a tracking job for the night, hopefully
I'll narrow to the single cron job this time.

Anyone seen that ?


> After applying the patch you should make sure there are no rejects with a `find
> -name \*.rej`.  If there aren't rejects all gone right.

I prefer running "patch --dry-run", I hate it when I have to wait for bzip2
and tar :}

Best regards,
-- 
Yann Dirson<[EMAIL PROTECTED]> |Why make M$-Bill richer & richer ?
debian-email:   <[EMAIL PROTECTED]> |   Support Debian GNU/Linux:
| Cheaper, more Powerful, more Stable !
http://ydirson.free.fr/ | Check <http://www.debian.org/>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: Looking for better 2.2-based VM (do_try_to_free_pages fails, machine hangs)

2000-11-01 Thread Yann Dirson

On Wed, Nov 01, 2000 at 10:00:02PM +0100, Andrea Arcangeli wrote:
> A -7 to apply to 2.2.18pre17 and _previous_ releases is in the directory

Argh !!  Damned sort order - I thought pre9 was the latest :(

Thanks,
-- 
Yann Dirson<[EMAIL PROTECTED]> |Why make M$-Bill richer & richer ?
debian-email:   <[EMAIL PROTECTED]> |   Support Debian GNU/Linux:
| Cheaper, more Powerful, more Stable !
http://ydirson.free.fr/ | Check <http://www.debian.org/>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: Looking for better 2.2-based VM (do_try_to_free_pages fails, machine hangs)

2000-11-01 Thread Yann Dirson

On Wed, Nov 01, 2000 at 02:59:01PM -0200, Rik van Riel wrote:

Andrea wrote:
> (btw, make sure you're using the -7 revision of the VM-global patch, as it
> includes the same MM corruption bugfix that is been included into 18pre18)

Damn, I was using -6.  
http://www.kernel.org/pub/linux/kernel/people/andrea/patches/v2.2/2.2.18pre9/ does not 
have -7.
Neither does your e-mind repository hlinked from linux-mm.

I'm currently running -6 :(


On Wed, Nov 01, 2000 at 02:59:01PM -0200, Rik van Riel wrote:
> it appears there has been amazingly little research on this
> subject and it's completely unknown which approach will work
> "best" ... or even, what kind of behaviour is considered to
> be best by the users...

Sounds to me like a good point to favour a config-time selection of
OOM killers.


> On Wed, 1 Nov 2000, Andrea Arcangeli wrote:
> > Fair enough as there isn't an oom killer in the kernel you're
> > running :). So it can kill unlucky tasks as well.
> 
> There's a (slightly outdated?) patch available on my home
> page, though...

Found http://www.surriel.com/patches/2.2.17pre8-oomkill.  Will take a
look, thanks.


> Not because I think it matters all that much on most systems
> (good admins put in enough memory&swap), but simply because

Ah, I'll have to reconsider how much I rate my skills :)

Best regards,
-- 
Yann Dirson<[EMAIL PROTECTED]> |Why make M$-Bill richer & richer ?
debian-email:   <[EMAIL PROTECTED]> |   Support Debian GNU/Linux:
| Cheaper, more Powerful, more Stable !
http://ydirson.free.fr/ | Check <http://www.debian.org/>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: Looking for better 2.2-based VM (do_try_to_free_pages fails, machine hangs)

2000-11-01 Thread Yann Dirson

On Wed, Nov 01, 2000 at 09:41:04AM -0200, Marcelo Tosatti wrote:
> VM-global It should fix your problem. 

Thanks for the hint, it works great indeed, I couldn't freeze the machine
any more - at least the make process understood Ctrl-C.

However, the OOM killer behaves in strange ways, it seems.  In the 2 "make
-j50" runs I had (one with the working fs mounted 'sync', the other
'async'), it mostly killed non-root processes, but once it killed 'cron',
which was run as root:

[sync run]
Nov  1 15:51:05 bylbo kernel: VM: killing process cpp
Nov  1 15:56:38 bylbo kernel: VM: killing process apache
Nov  1 16:02:54 bylbo kernel: VM: killing process cc1
Nov  1 16:08:51 bylbo kernel: VM: killing process wwwoffled

[async run]
Nov  1 17:13:08 bylbo kernel: VM: killing process apache
Nov  1 17:14:01 bylbo kernel: VM: killing process cron


apache was running as "www-data" (uid 33), wwwoffled as "proxy" (uid 13).

An idea that came upon me was whether it would be possible to add to the
OOMK some sort of preference for processes owned by "system users", to be
defined by a "uid limit".  For example, on Debian systems, where "real user"
uids start at 1000, it would be great if the OOMK would leave those
processes as far as possible off its kill list.  Opinions ?

Best regards,
-- 
Yann Dirson<[EMAIL PROTECTED]> |Why make M$-Bill richer & richer ?
debian-email:   <[EMAIL PROTECTED]> |   Support Debian GNU/Linux:
| Cheaper, more Powerful, more Stable !
http://ydirson.free.fr/ | Check <http://www.debian.org/>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Looking for better 2.2-based VM (do_try_to_free_pages fails, machine hangs)

2000-11-01 Thread Yann Dirson

Hi,

Using a 2.2.17 kernel I often experience problems where I get messages like
"VM: do_try_to_free_pages failed for ", and the machine hangs
until the VM can recover, which sometimes takes too long for me to wait.  I
suppose that the problem is similar sometimes when I get a frozen system
under X, but can't see the kernel messages then.

Yesterday I could reproduce this at will, with a "make -j50" on 2.2.17
sources (as unpriviledged user).  In less than half an our syslogd stopped
to log anything (at 00:38), and this morning I could only see those messages
trying to free pages for (or from ?) wwwoffled.  Last load see by "top" on
another VC was ~74.

Have some work been done for 2.2.18 that could help me ?  Are there some
2.2-based VM patches that could help (I found the VM-global patch from
Andrea but have no info about what it is, and could not find 2.2-based
patches on Rik's pages) ?

Also I can't be sure for now I don't run into a hw problem...

I'm willing to investigate, but clearly lack experience in the VM...

Regards,
-- 
Yann Dirson<[EMAIL PROTECTED]> |Why make M$-Bill richer & richer ?
debian-email:   <[EMAIL PROTECTED]> |   Support Debian GNU/Linux:
| Cheaper, more Powerful, more Stable !
http://ydirson.free.fr/ | Check <http://www.debian.org/>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/