similar to: [PATCH] Improve memory management of nbdkit python plugin example

Displaying 20 results from an estimated 10000 matches similar to: "[PATCH] Improve memory management of nbdkit python plugin example"

2016 Sep 26
1
Re: [PATCH] Improve memory management of nbdkit python plugin example
Hi, sorry for the resend. My mailer mangled the previous attempt. On 26.09.2016 17:19, Pino Toscano wrote: > On Monday, 26 September 2016 17:07:41 CEST Carl-Daniel Hailfinger wrote: >> the nbdkit python plugin example has suboptimal memory management: >> - it creates the disk image as a string on init >> - it casts the string to bytearray on every read >> - it copies
2016 Sep 26
0
Re: [PATCH] Improve memory management of nbdkit python plugin example
Hi, On Monday, 26 September 2016 17:07:41 CEST Carl-Daniel Hailfinger wrote: > the nbdkit python plugin example has suboptimal memory management: > - it creates the disk image as a string on init > - it casts the string to bytearray on every read > - it copies the string before and the string after the written region, > then reassembles those pieces together with the written region
2016 Sep 26
1
[PATCH] nbdkit: flags are 32 bits for oldstyle connections
# HG changeset patch # User Carl-Daniel Hailfinger <Carl-Daniel.Hailfinger@inf.h-brs.de> # Date 1474903734 -7200 # Mon Sep 26 17:28:54 2016 +0200 # Node ID dbd1ea0a401cedcfa426097a289d852971b14f1e # Parent d7d5078d08c711032837dcac79a4450226ec2ce5 nbdkit: Fix flags in old-style connection diff -r d7d5078d08c7 -r dbd1ea0a401c src/connections.c --- a/src/connections.c Sun Sep 25 05:04:02
2016 Sep 27
1
Re: Memory corruption when testing nbdkit python plugin with nbd-tester-client?
On 26.09.2016 20:40, Carl-Daniel Hailfinger wrote: > On 26.09.2016 19:20, Carl-Daniel Hailfinger wrote: >> On 26.09.2016 14:29, Richard W.M. Jones wrote: >>> On Mon, Sep 26, 2016 at 02:18:02PM +0200, Carl-Daniel Hailfinger wrote: >>>> Hi, >>>> >>>> has anyone ever run "make check" from nbd against nbdkit with a python >>>>
2016 Sep 26
2
Re: Memory corruption when testing nbdkit python plugin with nbd-tester-client?
On 26.09.2016 14:29, Richard W.M. Jones wrote: > On Mon, Sep 26, 2016 at 02:18:02PM +0200, Carl-Daniel Hailfinger wrote: >> Hi, >> >> has anyone ever run "make check" from nbd against nbdkit with a python >> plugin? I usually get segfaults during such a run, and sometimes various >> other errors happen before the segfault, suggesting that some memory
2016 Sep 26
2
Re: [Nbd] Testing NBD server implementations for correctness
Hi, On 26.09.2016 09:53, Wouter Verhelst wrote: > On Mon, Sep 26, 2016 at 03:22:52AM +0200, Carl-Daniel Hailfinger wrote: >> Running nbd-tester-client against nbdkit with oldstyle negotiation was fun. >> I managed to segfault nbdkit Side note: I'm going to try and get a backtrace from the nbdkit segfault and submit a bug report there. >> and noticed that
2016 Sep 26
2
Memory corruption when testing nbdkit python plugin with nbd-tester-client?
Hi, has anyone ever run "make check" from nbd against nbdkit with a python plugin? I usually get segfaults during such a run, and sometimes various other errors happen before the segfault, suggesting that some memory corruption is underway. AFAICS a pure python plugin should not be able to cause memory corruption. Examples of nbdkit logs for running "make check" or subsets of
2019 Nov 23
2
Re: [PATCH nbdkit v2 10/10] tests: Test the Python plugin thoroughly.
On Sat, Nov 23, 2019 at 3:10 PM Richard W.M. Jones <rjones@redhat.com> wrote: > > On Sat, Nov 23, 2019 at 01:42:15AM +0200, Nir Soffer wrote: > > On Fri, Nov 22, 2019 at 9:55 PM Richard W.M. Jones <rjones@redhat.com> wrote: > > > +def pread(h, count, offset, flags): > > > + assert flags == 0 > > > + return
2015 Oct 29
2
[nbdkit] can't import mmap
Hi, I'm new to nbdkit and am trying to run a simple "single file block device using mmap" setup, using this python script: import mmap def config(key, value): print ("ignored parameter %s=%s" % (key, value)) def open(readonly): print ("open: readonly=%d" % readonly) f = open("disk","r+") m = mmap.mmap(f.fileno(), 0,
2019 Nov 22
3
Re: [PATCH nbdkit v2 10/10] tests: Test the Python plugin thoroughly.
On Fri, Nov 22, 2019 at 9:55 PM Richard W.M. Jones <rjones@redhat.com> wrote: > > This tests the Python plugin thoroughly by issuing client commands > through libnbd and checking we get the expected results. > --- > tests/Makefile.am | 13 +-- > tests/test-python-plugin.py | 134 ++++++++++++++++++++++++++++ > tests/test-python.py | 172
2016 Sep 26
2
Re: [Nbd] Testing NBD server implementations for correctness
On Mon, Sep 26, 2016 at 11:43:42AM +0100, Alex Bligh wrote: > > > On 26 Sep 2016, at 10:21, Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> wrote: > > > > Wow, that was quick! Thank you. > > > > I stumbled upon another problem: Apparently nbd-tester-client and nbdkit > > disagree on what constitutes a valid flush request. > >
2005 Oct 03
8
ip address delete bug?
Hi, it seems that "ip address delete" will delete all addresses of the same class on an interface if it is ordered to only delete the first one: # ip a f eth0 # ip a l eth0 3: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000 link/ether xx:xx:xx:xx:xx:xx # ip a a 192.168.a.b brd + dev eth0 # ip a a 192.168.c.d brd + dev eth0 # ip a d 192.168.a.b brd + dev
2005 Jun 04
6
New HTB-derived qdisc for accounting?
Hi, at my local university network, I have to make sure no student uploads more than x GB/day. So far, I give them unlimited bandwidth until they have more than y GB (y<x) upload. After that, I use the u32 filter to associate the affected IP address with a HTB class limited to the rate (remainingtraffic/remainingtime). Since the accounting is done with ipt_ACCOUNT right now and the netfilter
2019 Nov 23
3
[PATCH nbdkit] python: Pass memoryview to pwrite()
Passing a memoryview we avoid unneeded copy of the original buffer. On the python side memoryview object can be used for slicing, writing to file, or sending to socket. This may break plugins assuming that the they get a bytearray, but good python code should not care about the type of the buffer, only about the behaviour. Testing with a plugin writing to /dev/null shows 2.7x speedup. Real
2019 Nov 24
1
Re: [PATCH nbdkit v2 10/10] tests: Test the Python plugin thoroughly.
On Sun, Nov 24, 2019, 12:42 Richard W.M. Jones <rjones@redhat.com> wrote: > On Sat, Nov 23, 2019 at 06:11:47PM +0200, Nir Soffer wrote: > > On Sat, Nov 23, 2019 at 3:10 PM Richard W.M. Jones <rjones@redhat.com> > wrote: > > > > > > On Sat, Nov 23, 2019 at 01:42:15AM +0200, Nir Soffer wrote: > > > > On Fri, Nov 22, 2019 at 9:55 PM Richard W.M.
2006 May 31
14
Linux router performance
Hi, I wonder about the performance of a Linux box used as router (I guest I''m not the first :). Althought I know it mainly depends on the hardware, I''m trying to find some references on the topic or comparations with other routing solutions (FreeBSD box used as router, Cisco, etc). For example, http://facweb.cti.depaul.edu/jyu/Publications/Yu-Linux-TSM2004.pdf (althought is
2019 Nov 23
8
[PATCH nbdkit v3 0/7] Implement nbdkit API v2 for Python plugins.
v2 was here: https://www.redhat.com/archives/libguestfs/2019-November/msg00163.html I pushed patch 1 (with spelling fix), patch 4 and patch 5 since those were previously ACKed on the list. Differences in v3: - Add error checking to PyModule_AddIntConstant. - Use API_VERSION constant instead of function. - Add max API version supported to --dump-plugin output. - Print API_VERSION selected by
2019 Nov 25
7
[PATCH nbdkit v2 0/7] Implement nbdkit API v2 for Python plugins.
v3 was here: https://www.redhat.com/archives/libguestfs/2019-November/msg00209.html In v4: - Rebase on top of current master. Includes various fixes and updates required because of Nir's patches that went into master. - Fix api_version() -> API_VERSION in patch 2 noted previously on the mailing list. Rich.
2019 Nov 25
3
[PATCH nbdkit 0/2] python: Implement pread passing buffer for v2 API.
As suggested by Nir, here: https://www.redhat.com/archives/libguestfs/2019-November/thread.html#00220
2006 Oct 02
2
[ANNOUNCE] iproute2-2.6.18-061002
This is a much delayed update to the iproute2 command set. It can be downloaded from: http://developer.osdl.org/dev/iproute2/download/iproute2-2.6.18-061002.tar.gz Repository: git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git For more info on iproute2 see: http://linux-net.osdl.org/index.php/Iproute2 The version number includes the kernel version to denote what