|
|
About
TODO
Blog
RSS
Old blog
Projects
Gallery
Notes
Thu, 30 Mar 2006
Stanislav Lem died Mar 27.
:: Link / Comments (0)
Wed, 29 Mar 2006
Released new CARP version.
It was tested with 2.6.15 FC5 kernel. This will likely work with previous kernel releases
too, but I did not check. I've added section in README file for this. If it will not be possible
to compile CARP with next releases I will update that section to reflect for which kernel tree
it must be built.
:: Link / Comments (0)
Good climbing day.
A lot of old traces were finished,
finally I've done some parts of my new favourite trace, although I can do it
only one per training, at athe beginning, since it flushes a lot of power.
It was definitely very good training today.
:: Link / Comments (0)
Tue, 28 Mar 2006
New connector module.
Yi Yang yang.y.yi_gmail.com created new connector module, Filesystem Event Connector,
the user can monitor filesystem activities via this module, currently, it
can monitor access, attribute change, open, create, modify, delete,
move and close of any file or directory.
Every filesystem event includes tgid, uid and gid of the process
which triggered this event, process name, file or directory name
operated by it.
Filesystem events connector is never a duplicate of inotify, inotify
just concerns change on file or directory, Beagle uses it to watch
file changes in order to regenerate index for it, inotify can't tell
us who did that change and what is its process name, but filesystem
events connector can do these, moreover inotify's overhead is greater
than filesystem events connector, inotify needs compare inode with
watched file or directories list to decide whether it should generate an
inotify_event, some locks also increase overhead, filesystem event
connector hasn't these overhead, it just generates a fsevent and send.
More info can be found in the following thread,
and info about v4 release can be found in the following thread.
:: Link / Comments (0)
Mon, 27 Mar 2006
Climbed with Grange in Baurock.
Not bad place, especially it's excellent reliefs and bouldering area, but number of traces
is too small, probably because of yesterday's championship,
and there are neither colour nor other marks to differ one trace from another
on the same set of shields. But it was good time there.
:: Link / Comments (0)
Sat, 25 Mar 2006
Old friends meeting.
I met with Fedor and Ira, Alexander and Yuliana, and Pavel today.
We decided to have a couple of beers in "Svarnya" - not bad beer restaurant,
but not very good. It is conventionalized with welding theme quite good
and has beer cocks on the tables made like gas-cylinders.
It was nice time there, and I glad I met my friends.
:: Link / Comments (0)
Fri, 24 Mar 2006
Server upgrade.
This site is hosted on good friends collocation,
which I helped to upgrade today. New machine is dual-core AMD64 with 2GB of memory
with raid1 (sw) for system partitions - really nice system.
Climbed with Grange a little.
Today's training was devoted to failings down with bottom rope.
It is very good feeling when you have couple of meters of the rope reserved
and just jumps from the holds into the void - magical feeling of the flying.
:: Link / Comments (0)
Thu, 23 Mar 2006
Generated w1 update and sent it for inclusion.
Patchbomb includes:
- generic read/write operations through sysfs for default w1 family
- replace dscore and ds_w1_bridge with ds2490 driver. Also various fixes in the driver
- userspace communication protocol over connector
- receive master/slave add/remove events
- process userspace commands (read/write/search/conditional(alarm) search)
- generate replies to userspace commands
- free netlink group #1, since w1 was completely moved to connector
:: Link / Comments (0)
By liberal opposition request access to Vladimir.Vladimirovich.ru materials is suspended.
LOL :)
:: Link / Comments (0)
Wed, 22 Mar 2006
w1 update.
Removed old-style hotplug support and added uevent hotplug support, several typo fixes,
which could lead to compilation failures or warnings if some debugging options are
enabled in kernel config.
w1 can be compiled against the latest kernels now, but not pre 2.6.15.
:: Link / Comments (0)
AIO sendfile.
Initial thoughts.
Reading data from disk and network processing are two completely different
problems, which are solved on different layers in Linux kernel.
Reading happens in three stages:
- setup read request or read data from VFS cache in process context
- process data in hardware - IDE/SCSI layer, hardware controllers - a lot of operations are done in hard IRQ context
-
- populate pages into VFS cache and copy it to userpsace. This also happens in process context.
Networking includes only two steps:
- move data to/from userspace from/to socket queue in process context
- hardware data processing happens in softirq/hardirq/process context
And asynchronous networking happens most of the time in softirq processing,
since it does not require to copy data between contexts, it copies data into
pages, which are setup in syscall time in process context.
So aio_sendfile() problem includes some interconnection between
process context oriented data reading and softirq oriented networking AIO.
As initial solution I concider moving data reading setup into workqueue,
where it will initialize asynchronous reading of several pages and
in completion callback it will push data into network using AIO mechanism,
which in turn will setup reading process of the next pages in process context
using workqueues.
:: Link / Comments (0)
Good climbing training today.
The last one was unfortunately more than a week ago, so I tried
to get everything today - finished new average trace on-sight, couple
of old complex traces, new bouldering.
Now every piece of body is in pain, which means the training was really good.
:: Link / Comments (0)
Tue, 21 Mar 2006
Fedora update.
I do most of my development on several test machines which run Fedora Core.
It is quite good distro, although it becomes more and more overbloated.
My x86_64 desktop had FC4 installed, so I decided to update it to cutting edge FC5.
I've known interesting thing about FC - e2fsprogs contains libs, which, if being removed,
completely destroy your system. And yum -y update has caught
one unresolvable dependency exactly in this package in some info page file.
So, if you are going to update x86_64 installation from FC4 to FC5 using yum, several steps must be done to succeed:
- be sure you have enough space to have two systems installed.
- store somewhere content of
e2fsprogs rpm, since you will need to manually remove it (yum fails to
resolve depenency for one of it's info page files),
and after this step almost all applications will refuse to start due to dependency on libcom_err library
from e2fsprogs package.
- install
fedora-release-5 rpm using command line tool
- run
yum -y update
- when it fails on
e2fsprogs dependency remove this package using rpm -e --nodeps --allmatches,
copy stored content of /lib64 for this package (note, that rpm and many other utils
do not work after e2fsprogs has been removed) from step 2
- continue with
yum -y update
Except this issues update was quite smooth.
:: Link / Comments (0)
Mon, 20 Mar 2006
Big w1 update.
Added userspace command processing over connector.
Read, write, search and conditional (alarm) search commands are supported.
Protocol is quite complex, for more information consider doc/w1.netlink and w1d.c
in the latest release.
w1d.c detects all master/slave devices and runs read/write/search set of commands
for each device found.
:: Link / Comments (0)
Sun, 19 Mar 2006
Weekly cooking madness.
Today I decided to cook up stewed squid - since it is my
first challenge in cooking sea food stuffs, so I did not expect
too much, but it really exceeded my expectations -
slightly fried in flour with onion and stewed in mayonnaise -
excellent tasty thing!
:: Link / Comments (0)
Sat, 18 Mar 2006
Kevent update.
I've updated kevent patchset and send if to netdev@ for review.
There is small activity there on this topic, but it is better than nothing.
The latest version
is available in archive.
Updated w1:
- use connector for notifications
- added yet empty handler for userspace command, which can be sent using connector
New version is available in archive.
:: Link / Comments (0)
Fri, 17 Mar 2006
Kevent.
I've fixed kevent_poll module, kevent_poll based web server shows the same performance as epoll.
Fighting with AIO is similar to breaking the wall using own head.
The maximum achieved results are 2100 Mb/s vs. 2000 Mb/s with the same CPU usage.
And that is why AIO design which operates with individual userspace pages
will always fail:

Vertical axis is number of megabytes per second transferred using either memcpy() with
different number of pages per call or copy_to_user() which transfers the whole buffer
at once. Horizontal axis is number of pages transferred each system call (in case of memcpy()
this transfer is splitted into 32, 4, or 1 pages).
As we can see on the graph, if we transfer data using memcpy() using only one page
per call, it is completely impossible to have the same performance as copy_to_user()
if it transfers the whole buffer at once.
Since pinned userspace pages can only be accessed one by one, it will be
the 'memcpy_1_page', i.e. purple graph.
If we add here kmap_atomic()/kunmap_atomic() overhead on highmem enabled
kernels, which halves performace picture becomes even worse.
:: Link / Comments (0)
Thu, 16 Mar 2006
Kevent and network AIO.
While doing some optimisations I broke things completely,
so today I spent a lot of time to remove those errors.
All parameters are the same in all tests.
Network AIO results are:
Sending in one flow.
async - 20-23 Mbyte/sec, CPU usage 0%
sync - 18-20 Mbyte/sec, CPU usage 0-1%
Sending in 10 flows.
async - 89 Mbyte/sec, CPU usage 1%
sync - 89 Mbyte/sec, CPU usage 13%
Receiving in one flow only.
async - 44 Mbyte/sec, CPU usage 0%
sync - 44 Mbyte/sec, CPU usage 9%
HTTP request rate.
30k connections, burst size of 3k connections, 1 sec timeout.
kevent - 2560 requests/sec
epoll - 1700 requests/seq
kevent_poll - broken
Reading from VFS cache. 40k read buffer.
kevent aio - 1600 Mb/s
sync read - 1900 Mb/s
:: Link / Comments (0)
Wed, 15 Mar 2006
Kevent, network AIO article.
Found an article on LWN about kevent and network AIO.
:: Link / Comments (0)
Tue, 14 Mar 2006
Asynchronous networking, zero-copy support and standards.
The Interconnect Software Consortium created a
draft for
"the Extend Sockets API", which includes preliminary inrface design
for asynchronous neworking operations and receiving zero-copy support
among others.
Usually publishing of such kind of docs is a way to force
commertial Unix vendors to implement proposed interfaces,
so we probably will hear about such implementations in modern systems soon.
Folks in Oracle already started to show it's interest in this area.
:: Link / Comments (0)
Mon, 13 Mar 2006
Updated w1.
- moved ds2490 based usb <-> w1 bus master driver from ds9490r tree into w1,
also added some documentation.
- added default generic read/write operations.
Special file in each w1 slave device's directory called "rw" is created
each time new slave and no appropriate w1 family is registered.
"rw" file supports read and write operations, which allow to perform
almost any kind of operations. Each logical operation is a transaction
in nature, which can contain several (two or one) low-level operations.
Let's see how one can read EEPROM context:
- one must write control buffer, i.e. buffer containing command byte
and two byte address. At this step bus is reset and appropriate device
is selected using either W1_SKIP_ROM or W1_MATCH_ROM command.
Then provided control buffer is being written to the wire.
- reading. This will issue reading eeprom response.
It is possible that between above steps w1 master thread will reset bus for searching
and slave device will be even removed, but in this case 0xff will
be read, since no device was selected.
OWFS will probably use
w1.
:: Link / Comments (0)
Sat, 11 Mar 2006
I'm back from deep shit state.
I caught some sick four days ago, three of which were spent
with temperature and head being cracked. Since I already do not
remember when I was ill last time, I really do not know what
medcine should be gotten for this, so I treated myself with
several liters of hot tea with lemon, apples and one aspirin tablet.
And I feel myself quite good today, although not 100% healthy yet,
so, to bring myself some kind of good mood,
I decided to cook up some tasty things.
Choice was made while looking at half-full or half-empty bottle of my favourite hot drink -
it was marinaded and stewed with onion in tequila, and then slightly fried meat.
Recipe was completely gotten from my head, but novice
frequently gets all the luck - I ate about a kilogram of my cooking results with
a garnish for 15 minutes - the worst thing in cooking is that one spends
quite a lot of time in kitchen while eating takes only several minutes.
:: Link / Comments (0)
Wed, 08 Mar 2006
I congratulate sweet ladies with theirs day.
:: Link / Comments (0)
Tue, 07 Mar 2006
Kevent based AIO.
It still performs worse than synchronous buffered reading
on about 20%, and it is without get_user_pages()
for each kevent, it is basically mapping of VFS page and userspace page
and copying data between them. I still can not find the root of
the problem there, since kevent subsystem itself is used at all
except for storing and updating data inside kevent.
:: Link / Comments (0)
Mon, 06 Mar 2006
New toys!
It is Bosch
GBH 2-26 DFR rotary hammer with SDS-plus shank.
Soon, very soon I will start completely new development process...
Climbed with Grange - I've finished already-simple old trace and still try to complete
my new favorite yellow 7a in the central sector in Skala-city.
This trace really force me to strain every nerve, and that is cool.
Also discussed what is better - to be high and slender or have a medium height and be full-bodied.
It looks like his favours completely
correspond to his weight :).
:: Link / Comments (0)
Sat, 04 Mar 2006
kmalloc() performance.
Vertical axis is number of Mbytes per second thrown through
test code without get_user_pages(),
horizontal one is number of pages in each run.

This benchmark shows that kmalloc() and SLAB allocator itself performs
excellent with linear performance improvements with allocation size increase.
:: Link / Comments (0)
Fri, 03 Mar 2006
Climbing.
Miracle happend - Grange arrived to the climbing training in time,
i.e. one hour and a half before he goes usually. And it was worthy of it - I have a really good training:
several old traces, one new complex trace. I tired a lot, which usually means that evening was spent not in vain.
:: Link / Comments (0)
get_user_pages() performance.
To find where kevent based AIO has bottlenecks, I've run
set of tests to determine performance of various calls in my implementation.
Here is pseudocode which was called:
fget_light();
igrab();
kzalloc(number_of_pages * sizeof(void *));
get_user_pages(number_of_pages);
It was found, that the most critical is get_user_pages() performance,
which scales as show on figure below. Vertical axis is number of Mbytes per second
thrown through above code, horizontal one is number of pages in each run.

Above codepath without get_user_pages() with 40 pages per run shows more than 22 Gb/sec,
whlist with get_user_pages() it is only about 14 Gb/sec.
:: Link / Comments (0)
Wed, 01 Mar 2006
Kevent based AIO.
I've fixed all known bugs, added reading offset and implemented
reading from VFS cache, if page is present there,
so userspace can read files as it could do using usual
synchronous buffer reading. There is couple of
simple nitpicks, like not returning an error when
end of file reached and not updating VFS cache with new
uptodate pages, but it is not so important now.
The main problem is performance. It is roughly the same,
compared to synchronous buffered reading,
when reading data from disk in either one or multiple
dataflows, it also the same when number of dataflows is small
(less than 10) when reading data from VFS cache, although
in both cases there are some jumps in each type of reading,
but performance becomes significantly worse (upto 30% lower)
when number of reading dataflows is high, for example with 100 readers
performance is about 700-720 Mbyte/sec for synchronous buffered reading
and only about 620 Mbyte/sec for kevent based AIO reading,
CPU usage in both cases is about 80-90%.
I strongly suspect userspace code, which spins trying
to read using wrong dataflow, so it requires some analysis.
Climbed with Grange today - I've finished old 7a trace and tried new one,
but definitely failed, since this trace looks more complex and I did not
have a rest between them. Actually it was almost all - today was an easy day.
:: Link / Comments (0)
|