On Nov 7, 2008, at 11:31 PM, cgutman(a)svn.reactos.org wrote:
> Author: cgutman
> Date: Fri Nov 7 14:31:34 2008
> New Revision: 37248
>
> URL: http://svn.reactos.org/svn/reactos?rev=37248&view=rev
> Log:
> - Check the status of IPSendDatagram
> - Validate the protocol
> - Use the hash value of the NCE address to get the lock
> - Simplify TCPAbortListenForSocket
> - Hardcode the length of the array
>
> + HashValue = *(PULONG)(&NCE->Address.Address);
> + HashValue ^= HashValue >> 16;
> + HashValue ^= HashValue >> 8;
> + HashValue ^= HashValue >> 4;
> + HashValue &= NB_HASHMASK;
It's used at least three times in the source code, I would do an
inline hash-calculating function for that.
On Fri, Nov 7, 2008 at 4:54 AM, Aleksey Bragin <aleksey(a)reactos.org> wrote:
> I highly doubt they work, in fact I'm sure they won't work at all.
> But their only duty is to allow building unmodified rpcrt4 from Wine.
> I still have a hope, somewhere very very deep in my soul, that Wine
> will stop using linux-specific APIs in DLLs.
You can hope and dream.
One of the problems we saw, such as in the case of wininet, using unix
sockets instead of winsock gave something like a 20% speedup in
performance. Another issue was that select on linux (thanks to glibc)
fixes FD_SETSIZE at 1024 so the solution was to move to using poll().
The poll/select thing is not that big of a deal as it can be wrapped
but fixing the winsock performance issues may require someone to
dedicate a lot of time profiling. If you can fix all of the issues so
that performance will be the same with pure win32, then I am sure
Alexandre will accept it.
--
Steven Edwards
"There is one thing stronger than all the armies in the world, and
that is an idea whose time has come." - Victor Hugo
Hi,
LOL, Wine code does not work at all.... I tested Area.exe with the
latest head and it dies and the application continues to work with out
drawing the PATH figures.
ReactOS:
(subsystems/win32/win32k/objects/gdiobj.c:544) Object->cExclusiveLock = 1
(subsystems/win32/win32k/objects/path.c:1911) BeginPath 1 0xbc07024b
(subsystems/win32/win32k/objects/path.c:1936) BeginPath 2 h 0xbd07024b
p 0x8d9b4830
(subsystems/win32/win32k/objects/path.c:2022) EndPath 0xbd07024b
(ntoskrnl/mm/rpoolmgr.h:820) Trying to allocate 8192 bytes from paged
pool - nothing suitable found, returning NULL
(subsystems/win32/win32k/objects/path.c:1609) Should never happen
(subsystems/win32/win32k/objects/path.c:1609) Should never happen
(subsystems/win32/win32k/objects/path.c:1609) Should never happen
(subsystems/win32/win32k/objects/path.c:1609) Should never happen
(subsystems/win32/win32k/objects/path.c:1609) Should never happen
(subsystems/win32/win32k/objects/path.c:1612) Got path flag
(ntoskrnl/mm/rpoolmgr.h:820) Trying to allocate 4096 bytes from paged
pool - nothing suitable found, returning NULL
<snip>
(ntoskrnl/mm/rpoolmgr.h:820) Trying to allocate 11264 bytes from paged
pool - nothing suitable found, returning NULL
(subsystems/win32/win32k/objects/gdiobj.c:544) Object->cExclusiveLock = 1
(subsystems/win32/win32k/objects/path.c:1911) BeginPath 1 0xbd07024b
(subsystems/win32/win32k/objects/path.c:1936) BeginPath 2 h 0xbe07024b
p 0x8d9b4830
(subsystems/win32/win32k/objects/path.c:2022) EndPath 0xbe07024b
(ntoskrnl/mm/rpoolmgr.h:820) Trying to allocate 2048 bytes from paged
pool - nothing suitable found, returning NULL
<snip>
(ntoskrnl/mm/rpoolmgr.h:820) Trying to allocate 2400 bytes from paged
pool - nothing suitable found, returning NULL
Entered debugger on last-chance exception (Exception Code: 0xc0000005)
(Page Fault)
Memory at 0x000004B0 could not be written: Page not present.
kdb:> bt
Eip:
<win32k.sys:84c9c (subsystems/win32/win32k/objects/bezier.c:160
(GDI_InternalBezier@20))>
Frames:
<win32k.sys:84dfd (subsystems/win32/win32k/objects/bezier.c:178
(GDI_InternalBezier@20))>
<win32k.sys:84deb (subsystems/win32/win32k/objects/bezier.c:178
(GDI_InternalBezier@20))>
<win32k.sys:84dfd (subsystems/win32/win32k/objects/bezier.c:178
(GDI_InternalBezier@20))>
<win32k.sys:84deb (subsystems/win32/win32k/objects/bezier.c:178
(GDI_InternalBezier@20))>
<win32k.sys:84dfd (subsystems/win32/win32k/objects/bezier.c:178
(GDI_InternalBezier@20))>
<win32k.sys:84deb (subsystems/win32/win32k/objects/bezier.c:178
(GDI_InternalBezier@20))>
<win32k.sys:84deb (subsystems/win32/win32k/objects/bezier.c:178
(GDI_InternalBezier@20))>
<win32k.sys:84dfd (subsystems/win32/win32k/objects/bezier.c:178
(GDI_InternalBezier@20))>
<win32k.sys:85008 (subsystems/win32/win32k/objects/bezier.c:216
(@GDI_Bezier@12))>
<win32k.sys:a1760 (subsystems/win32/win32k/objects/path.c:988
(@PATH_AddFlatBezier@12))>
<win32k.sys:a286a (subsystems/win32/win32k/objects/path.c:1019
(@PATH_FlattenPath@4))>
<win32k.sys:a295e (subsystems/win32/win32k/objects/path.c:1514
(NtGdiWidenPath@4))>
<NTOSKRNL.EXE:a145a (ntoskrnl/ke/i386/trap.s:244 (KiFastCallEntry))>
<ntdll.dll:5f1e>
<Area.exe:35ad>
<04ec8353>
Couldn't access memory at 0x56E58959!
kdb:>
The problem is in IntCreatePolyPolygonRgn, it is based on Xorg
mipolygen.c. The figure is some what complex and this old Xorg code
seems to become over whelmed by it. IntCreatePolyPolygonRgn calles
REGION_InsertionSort hundreds or even thousands of times. Using Qemu
you will sit there all night and that is the reason for using hardware
for this test. The first figure was 3 polygons with a total of 516
points. Question is, why is that so hard to map and sort? I assume the
next three figures have the same or close to the same amount of
points. Since they do look and draw about the same.
The bug report has GDI_InternalBezier faulting out the kernel, well
since there is no more PagedPool available so it returned a NULL
without faulting.
I'm looking into alternative methods that are much simpler than the
Xorg code for mapping and filling regions. My best one is from
Graphapp, it is a modified variation of the same Xorgs poly code. This
means more time I do not have to work out a hypothesise and rewrite
all of the region code.
FYI: Our Xorg code is the same Xorg code that is in wine....... I
assume wine code breaks and bombs out when the memory pool empties.
Which is not avalid excuse not to draw.
Thanks,
James
On Thu, Nov 6, 2008 at 7:05 AM, Aleksey Bragin <aleksey(a)reactos.org> wrote:
> How does this code work in Wine without this change?
>
> WBR,
> Aleksey.
>
How does this code work in Wine without this change?
WBR,
Aleksey.
On Nov 6, 2008, at 2:55 PM, jimtabor(a)svn.reactos.org wrote:
> Author: jimtabor
> Date: Thu Nov 6 05:55:08 2008
> New Revision: 37223
>
> URL: http://svn.reactos.org/svn/reactos?rev=37223&view=rev
> Log:
> - Fix WidenPath. Now Area.exe runs and crashes when using real
> hardware. That is a good thing. We now know our Xorg based region
> code has problems. It allocates all the memory building PolyPolygon
> region data.
Hi guys,
After a lot of requests from people in ReactOS, I have decided to
continue my work on USB support, the new bootloader and eventually
Firewire and audio support. Making use of the freedom within the project
I'll use my own, fully spec'ed and documented working methods, attract
devs to work for me when I deem necessary and rally for donations for a
speedy completion of those tasks.
Since there's no roadmap or central goals I'll also set those for myself
and my team(s). I'll provide regular updates on all activities inside
those projects on an as of yet unknown location (ReactOS wiki?) and use
a central repository for all documentation and specification produced by
these projects.
Maya
Hi all,
Fixing GetDeviceCaps exposed a thread process shared memory issue with
WinLogon and Gimp.... Gimp bug, been around and the crash does not
make sense until you see where the fault was located. Where? In client
thread share memory. So, we need help and soon I will revert the hack
in GetDeviceCaps. Maybe we are not passing everything to User32 that
is needed.
Thanks,
James
Gentlemen,
If you don't mind me intruding, I'd like to propose some things I think
may ease life for us poor ROS devs, existing and new ones :)
First of all, I'd like to suggest 'apprenticeship programming', also
known by other names, but which commonly involves having one seasoned
programmer in charge of a particular (sub-)project and one or more
programmers following his lead. These latter programmers would be less
experienced but could work on relatively advanced stuff due to the lead
of the seasoned programmer. This model is commonly used in companies
already and if adapted for ROS it should make it much easier for
'newbie' devs to get started, pick up experience and become seasoned
devs themselves.
My own experience with picking up the USB subproject reflect this as
well. It's hard to get started without much of a lead, especially when
one's experience with the NT subsystems is limited. This is also where
documentation would have helped, bringing me to my second point:
Whenever I start a new project or implementation I first write a
technical specification detailing the exact layout, APIs and
implementation. I've heard that this is common practice in professional
programming as well as other areas. Benefits include having a good
overview of the project before one starts on it, being able to pick out
obvious oversights before writing a single line of code, having a
central place of reference (code does _not_ work for this), allows one
to quickly pick up on things during maintenance sessions (many months
later...). It'd also enable the apprentice programming system and make
it easy for the central project leader(s) to get an overview of the
progress being made.
Documentation and specifications are often ignored by programmers
because they're not deemed 'time-efficient', preferring to start
programming right away instead. In my experience and those of everyone
in high-level jobs involving anything from programming to hardware
design (like my housemate who is a senior engineer in a Dutch company
which designs chips for the telecom industry), specifications and
documentation are the lifeblood of any project.
I have elected to use both the apprentice method as well as the
documentation approach in my work on the new installer, bootloader and
USB stack for ReactOS, attracting two relatively inexperienced but
highly motivated devs for the installer (RI2, or ROSE) project already.
They have expressed interest in helping me with further projects in ROS
as well, even more low-level things. I think that this is a good example
of the future ROS should be heading towards.
So yeah, that's my rant I guess :)
*ducks and runs for cover*
Maya Posch